Hi,
I have my NLog configs in separate files, normally named nlog.config. When an application starts, i load the config by calling LogManager.LoadConfiguration("nlog.config");
Here's a typical nlog.config:
<?xml version="1.0" encoding="utf-8"?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" internalLogToConsole="true" internalLogLevel="Warn" autoReload="true">
<!-- Actual configuration -->
</nlog>
After updating to 4.6 i started seeing messages like these in the console upon an application start:
NLog: 2019-03-28 07:32:36.0827 Warn Skipping unknown 'NLog' property internalLogLevel=Warn
NLog: 2019-03-28 07:32:36.1380 Warn Skipping unknown 'NLog' property autoReload=true
NLog: 2019-03-28 07:29:05.0533 Warn Skipping unknown 'NLog' property xmlns=http://www.nlog-project.org/schemas/NLog.xsd
NLog: 2019-03-28 07:29:05.0533 Warn Skipping unknown 'NLog' property xsi=http://www.w3.org/2001/XMLSchema-instance
So, either there was some breaking change in 4.6 which i cannot find any info about or there is a bug.
Any help is appreciated,
-D
Hi! Thanks for opening your first issue here! Please make sure to follow the issue template - so we could help you better!
Hi, what's the platform? What was the previous (working) version? Please post the internal log (trace level) in this ticket. (Please use the issue template)
4.6 doesn't have breaking changes with other 4.x releases
@304NotModified The platform is .NET Core 2.2. The previous working version was 4.5.11
Please check out the attached project. If you run it, you will see what i'm talking about. And if you then change .csproj to reference 4.5.11, you will see that the problem goes away.
checking this now
I can confirm this in 4.6 and in "DEV"
I can also confirm these warnings won't influence the behavior of NLog, so these warnings are only false positives :)
That is great they do not affect any behavior. Still, we all need less noise in this already noisy world :)
That is my fault. Added extra validation when extracting LoggingConfigurationParser with #2891
Created new PR that reduces the noise of parsing NLog-config along with removing known false-positives. See also #3253
Hi! This is fixed in NLog 4.6.1: https://www.nuget.org/packages/NLog/4.6.1