exceptionless/Exceptionless.Net

NLog plugin minLevel not work

jol5 opened this issue · 5 comments

jol5 commented
// Test NLog
            var config = new LoggingConfiguration();
            var exceptionlessTarget = new ExceptionlessTarget();
            config.AddTarget("exceptionless", exceptionlessTarget);
            config.LoggingRules.Add(new LoggingRule("*", global::NLog.LogLevel.Debug, exceptionlessTarget));
            LogManager.Configuration = config;

            var logger = LogManager.GetCurrentClassLogger();
            logger.Warn()
                .Message("App Starting...")
                .Tag("Tag1", "Tag2")
                .Property("LocalProp", "LocalValue")
                .Property("Order", new { Total = 15 })
                .Write();

follow code only warn,error log
will send to Exceptionless

ENV:
netcore 3.1
NLog 4.7.7
Exceptionless.NLog 4.6.2
image

Hello,

Thanks for reaching out to us!

你好,

感谢您与我们联系!

image

The log level is always a warning

This should work if you remove the api key from the nlog config section. When you specify an api key there it uses an internal Exceptionless client instance. Does this fix this issue?

This should work if you remove the api key from the nlog config section. When you specify an api key there it uses an internal Exceptionless client instance. Does this fix this issue?

OK, it works.
Thank you very much.