Logging Configuration

Learn to configure logging on CRM.launcher.

The following screenshot shows the update.Launcher.NamedPipeServer.exe.config file with the loglevel attribute set to “warning” and the filepath that points to the launcher_server.log file.

The following sample code provides the logging configuration details:
<update.net>
...

<update.lib>
	<Logging>
		<Channel logLevel="Warning" writerName="writer" formatterName="formatter" />
		<Writer filePath="%PRODUCTFOLDER%\log\launcher_server.log" name="writer" maxSizeKB="8192" closeOnIdleTimeout="5" 
			type="update.Lib.Logging.Writers.FileLogWriter,update.Lib" />
		<Formatter name="formatter" type="update.Lib.Logging.Formatters.DefaultLogFormatter,update.Lib" />
	</Logging>
</update.lib>
</update.net>

CRM.launcher allows the following log levels:

  • NoLogging – Nothing is written to the log file.
  • Emergency – The system is unusable.
  • Alert – Actions requiring immediate attention are logged.
  • Critical – Only critical conditions are recorded in the log file.
  • Errors – Only errors are written to the log file.
  • Warning – Only warnings are written to the log file.
  • Notice – Normal but significant conditions are written to the log file.
  • Info – Errors, Warning, and information messages are written to the log file.
  • Debug – Everything is written to the log file.