JKorf / OKX.Net

A C# .netstandard client library for the OKX REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/OKX.Net/
MIT License
28 stars 15 forks source link

Checking the log #12

Closed overstartup closed 9 months ago

overstartup commented 11 months ago

How can I check the log in debug mode? In old version, I remember we could set it as parameter in client option.

prodigy commented 10 months ago

You need to pass a ILoggerFactory instance to the constructor of the clients. See this constructor: https://github.com/JKorf/OKX.Net/blob/main/OKX.Net/Clients/OKXRestClient.cs#L31C48-L31C48

The logger needs to have debugging / trace log levels enabled to see internal messages.

JKorf commented 10 months ago

Either that or use dotnet DI to instantiate the client, it's configured according to the dotnet logging configuration then