Nlog has replaced log4net for configuring logging levels
The log4net assembly will no longer be released with IT Asset Management, and has been replaced by Nlog. Note: The Nlog assembly will be included in the installers.
NLog is a logging platform that writes to several different targets (database, file, console) and allows users to change logging configuration on an ad hoc basis. For more information about Nlog, visit Nlog's website.
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true">
<extensions>
<add assembly="Flexera.Common.Logging"/>
</extensions>
<!-- the targets to write to -->
<targets>
<!-- write logs to file -->
<target xsi:type="Console" name="console" layout="[${date:format=yyyy-MM-dd HH\:mm\:ss.fff}] [${level:padding=-5:fixedLength=true:uppercase=true}] ${message:exceptionSeparator=\r\n:withException=true}" />
<target xsi:type="File" name="file" maxArchiveFiles="1000" archiveNumbering="Date" filename="${gdc:item=ComplianceLoggingPath:whenEmpty=${baseDir}}/InventoryBeacon/inventorybeacon.log"
archiveEvery="Day" archiveDateFormat="yyyy-MM-dd" layout="${date:format=yyyy-MM-dd HH\:mm\:ss,fff} [${logger:padding=-22:fixedLength=true}] [${level:padding=-5:fixedLength=true:uppercase=true}] ${message:exceptionSeparator=\r\n:withException=true}" />
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="file" />
<logger name="*" minlevel="Info" writeTo="console" />
</rules>
</nlog>
In the new Nlog config file, for customers that want to change the level value for the logging, they can now do so by configuring two different levels towards the end of the config file (<logger name="*" minlevel="Info" writeTo="file" /> and <logger name="*" minlevel="Info" writeTo="console" />). One level outputs to a file and the other logs to the console. The six levels remain the same as they were for log4net - FATAL, ERROR, WARN, INFO, DEBUG and TRACE.
For more information on how Nlog works with IT Asset Management, see Configure logging levels with Nlog in the online help. For information on configuring Nlog advanced settings, such as maxArchiveFiles and archiveNumbering, visit the Configuration options page on Nlog's documentation site.
IT Asset Management (Cloud)
Current