Nlog has replaced log4net for configuring logging levels

FlexNet Manager Suite version 2022 R1.7

The log4net assembly will no longer be released with FlexNet Manager Suite, 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.

Note: The Nlog upgrade impacts the logs that are generated on the server and the beacon. No logging changes have been made to the agent. Customers do not need to perform any new actions concerning this upgrade. Logging configuration is still changed by means of the XML config files in the default location C:\ProgramData\Flexera Software\Compliance\Logging, and the log files themselves will look identical to log files generated from previous FlexNet Manager Suite releases.
An example of the content (ARL) import server Nlog config file:
<?xml version="1.0"?>
<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"
      internalLogFile="C:\temp\mgsImportRecognition.log"
      internalLogLevel="INFO"
      throwExceptions="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 type="CleanupFileAppender" name="file" maxArchiveDays="30" maxArchiveFiles="1000"
                archiveEvery="Day" archiveDateFormat="yyyy-MM-dd" archiveFileName="${gdc:item=ComplianceLoggingPath:whenEmpty=${baseDir}}/Content/mgsImportRecognition.log{#}.log" archiveNumbering="Date"
                filename="${gdc:item=ComplianceLoggingPath:whenEmpty=${baseDir}}/Content/mgsImportRecognition.log"
                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 FlexNet Manager Suite, 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.

FlexNet Manager Suite (On-Premises)

2024 R2