Help NLog Logs

NLog Logs

NLog is a widely used logging framework in windows .NET Application and C#. Site24x7 AppLogs is a one of a kind cloud based log management service that helps you manage logs with ease. Site24x7 agent automatically detects NLog based logs in your machine and identifies the log fields such as date & time, log level, logger name, and message. With default support for NLog logs, you can search, view, collect and analyze the data with the help of the intuitive web client.  Learn more about log management with Site24x7.

Getting started 

  1. Log in to your Site24x7 account.
  2. Download and install the Site24x7 Server Monitoring agent (Windows). 
  3. Go to Admin > AppLogs > Log Profile and Add Log Profile.

Logs file path

Each application writes logs in different folders and files. NLog logs are sourced from the below-mentioned folder path for the respective Operating System. If you have logs in a different folder, you can mention it under the File Path to source them from that particular folder while creating a log profile.

Windows icon
:
C:\\NLog\\*.log*

Log file path given here is for reference ONLY. By default Site24x7 runs a script to find the specific file path.

Log pattern

$DateTime:date|$LogLevel$|$LoggerName$|$Message$

This is the default pattern defined by Site24x7 for parsing NLog logs based on the sample log mentioned below.

Sample log

2018-1-20 11:10:06.7166|FATAL|ConsoleApplication1.Program|Sample fatal error message:: 0

The above sample log can be separated into 4 fields, each of which will take its respective value from here and will then be uploaded to Site24x7.

 Field name  Field value
Date Time 2018-1-20 11:10:06 .7166
Log Level FATAL
Logger Name ConsoleApplication1.Program 
Message Sample fatal error message: 0   

Related log types

Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.

Help NLog Logs