Configure logging levels with Nlog
In FlexNet Manager Suite, log files are generated by the Nlog logging platform for the application server and the beacon. Note: The Nlog logging platform does not apply to the agent.
Nlog allows users to write to several different targets (database, file, console) and change logging configuration on an ad hoc basis. For more information about Nlog, visit Nlog's website.
It's common for customers to change the log level value in a config file. The highest log level value is FATAL, followed by ERROR, WARN, INFO, DEBUG and the lowest log level value TRACE. When a particular log level is set in a config file, higher log levels will also display. For example, on setting the INFO log level, the FATAL, ERROR and WARN log levels will also display.
This determines the log type. For example, INFO will provide informational messages in the log files.
Some customers may also change the MaxAgeDays value (default = 30) to 90 (this value determines how many days the logs will be kept for). Some log files have config settings for how large the log file is allowed to become before it's deleted (10mb, 50mb).
The default base directory containing Nlog config files for FlexNet Manager Suite is C:\ProgramData\Flexera Software\Compliance\Logging\. Generated log files are saved to the same location.
This base directory may be overridden by setting the registry entry HKLM\SOFTWARE\WOW6432Node\ManageSoft Corp\ManageSoft\Compliance\CurrentVersion\LoggingBaseDirectory.
Each config file is an XML document containing Nlog configuration options. The logging level can be edited using a text editor. For example, see the application server Nlog config file below.
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>
To change the logging level value, two different levels towards the end of the config file can be configured (<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. There are six levels:
Logging level | Details |
---|---|
INFO |
Informational messages |
ERROR |
Error messages |
WARN |
Warnings which don't appear to the user of the application |
DEBUG |
Less detailed and/or less frequent debugging messages |
TRACE |
Very detailed log messages, potentially of a high frequency and volume |
FATAL |
Fatal error messages. After a fatal error, the application usually terminates |
Configuring logging for the application server
The following table provides default logging configuration details for various application server components & subsystems.
Component / Subsystem | Location under C:\ProgramData\Flexera Software\Compliance\Logging | Application server type(s) |
---|---|---|
Web UI Events from core parts of the web interface. Typically contains details from red error bars that appear in the UI, with an error ID in the log matching the ID shown in the UI. |
WebUI\WebUI.log |
Web |
Batch processor service Events from the "FlexNet Manager Suite Batch Processor" Windows service. The batch processor service receives jobs from the scheduler, runs the job and then sends a message to indicate success back to the scheduler. This log shows details of tasks being run by the batch processor, including what command line is used to launch the task. |
BatchProcessScheduler\ BatchProcessor.log |
Batch |
Batch process scheduler service Events from the "FlexNet Manager Suite Batch Process Scheduler" Windows service. The scheduler service picks up messages from Microsoft Message Queue queues to trigger tasks add tasks to a queue, and then sends the tasks to the batch processor service for processing. Logging shows when a task is received, sent for processing, and when the batch processor indicates the task has been completed. |
BatchProcessScheduler\ BatchProcessScheduler.log |
Batch |
Batch process task execution Events from the BatchProcessTask*.exe executables. Rarely useful but should be checked when troubleshooting batch processor issues. Logs when a task is queued with the batch processor and also logs the output when you run BatchProcessTaskConsole.exe manually to list tasks. |
BatchProcessTask\ BatchProcessTask.log |
Batch |
Compliance import Import of inventory from data sources into the compliance database and license reconcile operations. The compliance import process can create folders on the batch server with a GUID name and containing an import log file. These log folders and files are normally deleted before the associated import process completes. However sometimes this cleanup is not performed (such as if an import is terminated prematurely) and the folder is left behind. It is generally safe to delete such folders which are old (say 7 days or more). |
ComplianceReader\ importer-[ddmmyyyy]-[pid].log <GUID>\ importer-[ddmmyyyy]-[pid].log |
Batch |
Beacon services Logs events relating to beacons which report to this server (through the "inventory-beacons" virtual directory in IIS). (Not to be confused with logging from locally installed beacon components.) Some examples of information captured in these log are:
|
InventoryBeacons\beacon-services.log |
Batch |
Content library updates (2018 R2 and later) Logging from content library update processes details the steps taken to download and update content. |
Content\mgsImportRecognition.log, recognition.log and importPURL.log |
Batch |
Content library updates (prior to 2018 R2) Log files for library updates processes are stored in the %TEMP% folder of the user who launched MgsImportRecognition.exe. To determine where logs will be stored, you will need to identify which user account launched the MgsImportRecognition.exe process. If the library update has been triggered by the scheduled task on the batch server, this will typically be the account used to run the "FlexNet Manager Suite Batch Processor" Windows service. If MgsImportRecognition.exe is executed manually, then the log will be in the temp folder of the running user. |
C:\Windows\Temp for processes invoked using the SYSTEM identity OR %TEMP% of the service account |
Batch |
Web resolver dispatcher This log captures events from the web resolvers about the import into the database of various data files that are uploaded from beacons. The most common types of files processed include ActionStatus, ActiveDirectory, ActivityStatus, BeaconStatus, ClientAccess, Discovery, Inventories, Logs and Usage Data. This does not include uploads of 3rd party inventory (SCCM etc) and business adapter imports. |
WebResolvers\dispatcher.log |
Inventory |
Web resolver activity status Similar to the dispatcher log, this log captures events from the web resolver about the import of information into the database. This log is specifically for .activity files. Activity files form a lot of the information you see on the System Tasks page in the UI. If you're troubleshooting a problem with the System Tasks page, this log can definitely be useful. |
WebResolvers\activitystatus.log |
Inventory |
Beacon status Similar to the dispatcher log, this log captures events from the web resolver about the import of information into the database. This log is specifically for .bstat files. |
WebResolvers\beaconstatus.log |
Inventory |
FlexNet Manager Suite to ServiceNow Export logs The path for this log file is configured in the file <InstallDir>\DotNet\bin\ ServiceNowExport\ fnmp_servicenow_export.exe.config. |
C:\Temp\Log\log.log |
|
SAP reader Captures information about the import of SAP inventory. On the batch server, generally a zip file containing SAP inventory is uploaded from a beacon, which is then unzipped and imported into the FNMS database. Be sure to also check SAPReader.log on the beacon. |
SAPReader\SAPReader.log |
Batch |
SAP reconciliation Logging from the batch process that recalculates a SAP license position. |
SAPReconciliation\ SAPReconciliation.log |
Batch |
SAP portal Events from the SAP Portal UI. |
SAPPortalUI\SAPPortalUI.log |
Web |
Single sign-on SAML or OAuth 2.0 single sign-on (SSO) logging. Logging related to requests to the identity provider that can be used in conjunction with the WebUI log for troubleshooting SSO issues. |
OAuth\sso.log |
Web |
Compliance API Logging from an internal SOAP web API service. This web service is used for various integrations between Flexera products. |
FNMSWebAPI\fnmswebapi.log |
Web |
Baseline imports Logs from baseline purchase import operations. |
BaselineImport\<GUID>\ BaselinePurchaseCreation.log |
Batch |
Business data imports Logs from business adapter imports. Typically a business adapter will run on a beacon which will read information from the source and create a zip file with the data which is uploaded to the batch server. Then the batch server unzips this file and processes the information into the compliance database. Be sure to check beacon logs too when troubleshooting business adapters. |
BatchDataImport\ BusinessImport.log [AdapterName]-[GUID].log |
Batch |
Shadow host process launcher Instead of the batch processor launching executables directly, it actually launches ShadowHost.exe which then takes care of launching the target executables. This logging captures information from ShadowHost processes. Examples of tasks captured include:
Note that these logs are mostly useful if you would like to see command lines used to invoke various processes, or if executables completely fail to launch. If an executable launches but then fails, you will generally find the log file from that process more useful. For example if a compliance import process is started successfully but then fails to complete, check the Compliance Import logs. ShadowHost logging also enables some interesting logging from both batch process services. For example you can see database queries made by these services. Tip: ShadowHost logging can be enabled by adding a new DWORD registry entry HKLM\SOFTWARE\WOW6432Node\ ManageSoft Corp\ManageSoft\Compliance\ CurrentVersion\ ShadowHostTracingEnabled with the value 1. |
ShadowHost\*.log |
All |
Cognos package import Importing the Cognos/Flexera Analytics package is a one off configuration task. Results are logged in this file. |
CognosPackageImport\ CognosPackageImport.log |
Batch |
FlexNet Manager Suite (On-Premises)
2024 R1