I would like to disable trace level but I am not able to add enabled pr" /> I would like to disable trace level but I am not able to add enabled pr" /> I would like to disable trace level but I am not able to add enabled pr"/>

Enabled attribute is not declared in nlog rule

346 Views Asked by At
<logger level="Trace" name="fileLogger" writeTo="FileLogger" enabled="false"/> 

I would like to disable trace level but I am not able to add enabled property to my rule. Getting warning like enabled attribute is not declared.

Anything else should I do to declare it?

1

There are 1 best solutions below

0
Julian On

This attribute is indeed missing in the XSD schema of NLog (currently 4.7.1).

You could ignore this warning, as this won't influence the logging. So you could use the enabled attribute without problems!

The warning will be fixed in NLog 4.7.2 (PR here)

Update NLog 4.7.2 has been released, also https://nlog-project.org/schemas/NLog.xsd has been updated

enter image description here