mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-10 01:16:24 +00:00
Some options logging
This commit is contained in:
parent
fb9e9f9aa6
commit
996f3c2ced
@ -35,6 +35,11 @@ namespace CryptoExchange.Net
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal protected string BaseAddress { get; }
|
internal protected string BaseAddress { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Api client options
|
||||||
|
/// </summary>
|
||||||
|
internal ApiClientOptions Options { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ctor
|
/// ctor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -42,6 +47,7 @@ namespace CryptoExchange.Net
|
|||||||
/// <param name="apiOptions">Api client options</param>
|
/// <param name="apiOptions">Api client options</param>
|
||||||
protected BaseApiClient(BaseClientOptions options, ApiClientOptions apiOptions)
|
protected BaseApiClient(BaseClientOptions options, ApiClientOptions apiOptions)
|
||||||
{
|
{
|
||||||
|
Options = apiOptions.;
|
||||||
_apiCredentials = apiOptions.ApiCredentials?.Copy() ?? options.ApiCredentials?.Copy();
|
_apiCredentials = apiOptions.ApiCredentials?.Copy() ?? options.ApiCredentials?.Copy();
|
||||||
BaseAddress = apiOptions.BaseAddress;
|
BaseAddress = apiOptions.BaseAddress;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ namespace CryptoExchange.Net
|
|||||||
|
|
||||||
ExchangeName = exchangeName;
|
ExchangeName = exchangeName;
|
||||||
|
|
||||||
log.Write(LogLevel.Debug, $"Client configuration: {options}, CryptoExchange.Net: v{typeof(BaseClient).Assembly.GetName().Version}, {ExchangeName}.Net: v{GetType().Assembly.GetName().Version}");
|
log.Write(LogLevel.Trace, $"Client configuration: {options}, CryptoExchange.Net: v{typeof(BaseClient).Assembly.GetName().Version}, {ExchangeName}.Net: v{GetType().Assembly.GetName().Version}");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -77,6 +77,7 @@ namespace CryptoExchange.Net
|
|||||||
/// <param name="apiClient">The client</param>
|
/// <param name="apiClient">The client</param>
|
||||||
protected T AddApiClient<T>(T apiClient) where T: BaseApiClient
|
protected T AddApiClient<T>(T apiClient) where T: BaseApiClient
|
||||||
{
|
{
|
||||||
|
log.Write(LogLevel.Trace, $" {apiClient.GetType().Name} configuration: {apiClient.Options}");
|
||||||
ApiClients.Add(apiClient);
|
ApiClients.Add(apiClient);
|
||||||
return apiClient;
|
return apiClient;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ namespace CryptoExchange.Net.Objects
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{base.ToString()}, Proxy: {(Proxy == null ? "-" : Proxy.Host)}";
|
return $"{base.ToString()}, Proxy: {(Proxy == null ? "-" : Proxy.Host)}, Base.ApiCredentials: {(ApiCredentials == null ? "-" : "set")}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ namespace CryptoExchange.Net.Objects
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{base.ToString()}, Credentials: {(ApiCredentials == null ? "-" : "Set")}, BaseAddress: {BaseAddress}";
|
return $"Credentials: {(ApiCredentials == null ? "-" : "Set")}, BaseAddress: {BaseAddress}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user