exceptionless / Exceptionless.Net

Exceptionless clients for the .NET platform
https://exceptionless.com
Other
554 stars 142 forks source link

Debug and INFO level logs are not displayed #259

Closed benxionghu closed 3 years ago

benxionghu commented 3 years ago

--Version exceptionless/api:6.0.0 exceptionless/job:6.0.0 exceptionless/ui:2.9.2 exceptionless/elasticsearch:7.5.2 kibana:7.5.2

--- Code configuration Startup configuration image

Program configuration image

appsettings.json

image

ExceptionlessUi Show image

log Record Code

image

I wonder why only the logs of WARNING and ERROR are logged in my project ,Can you give me some ideas?

benxionghu commented 3 years ago

--version exceptionless/api:6.0.0 exceptionless/job:6.0.0 exceptionless/ui:2.9.2 exceptionless/ elasticsearch:7.5.2 kibana:7.5.2

--- 代码配置 启动配置 图像

程序配置 图像

appsettings.json

图像

ExceptionlessUI 秀 图像

日志记录代码

图像

我想知道为什么我的项目中只记录了WARNING和ERROR的日志,你能给我一些想法吗?

ExceptionlessClient.Default.CreateLog("11", "测试日志消息", LogLevel.Debug); ExceptionlessClient.Default.CreateLog("11", "测试日志消息", LogLevel.Info); Tried to use this method to record but also to no avail

niemyjski commented 3 years ago

Hello,

Can you please try setting: ExceptionlessClient.Default.Configuration.SetDefaultMinLogLevel(LogLevel.Debug) https://github.com/exceptionless/Exceptionless.Net/blob/master/src/Exceptionless/Configuration/ExceptionlessConfiguration.cs#L213 I'm thinking your log levels are being ignored by the default settings until sever settings are retrieved.

benxionghu commented 3 years ago

Hello,

Can you please try setting: ExceptionlessClient.Default.Configuration.SetDefaultMinLogLevel(LogLevel.Debug) https://github.com/exceptionless/Exceptionless.Net/blob/master/src/Exceptionless/Configuration/ExceptionlessConfiguration.cs#L213 I'm thinking your log levels are being ignored by the default settings until sever settings are retrieved.

Thank you for fixing the current issue after setting the log level

niemyjski commented 3 years ago

Thanks for the update. @ejsmith we may want to tweak this or add something to the readmes as I've been asked this quite a few times.