exceptionless / Exceptionless.Net

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

Setting loglevel to Warning? #196

Closed vindberg closed 5 years ago

vindberg commented 5 years ago

I am extending the default LoggerFactory of aspnet core 2 like this:

            loggerFactory.AddExceptionless("API_KEY");

How do I set the loglevel to "warning" or "error"? Setting the global level isn't working.

niemyjski commented 5 years ago

It picks up the log level defined in your logging config.

niemyjski commented 5 years ago

If you want to set a default min level for exceptionless as whole you can do it via

Add ability to set the min log level in configuration by calling SetDefaultMinLogLevel. This allows you to set a min log level until server configuration is applied.

vindberg commented 5 years ago

Im not able to access the default exceptionless client because im using the Signed nuget packaged. DAmn.

Error CS0433 The type 'ExceptionlessClient' exists in both 'Exceptionless.Signed, Version=4.3.2012.0, Culture=neutral, PublicKeyToken=fc181f0a46f65747' and 'Exceptionless, Version=4.3.2012.0, Culture=neutral, PublicKeyToken=null'

niemyjski commented 5 years ago

Can you try just using the unsigned package?

vindberg commented 5 years ago

The unsigned version has ref to .Net 4.6 which I wanted to avoid. However, using the unsigned allows me to define it as you mentioned. Thanks for the help.

niemyjski commented 5 years ago

The unsigned and signed versions target the same frameworks. If you are running on net standard it will not use any of the .net 4.6 assemblies.