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
- Log in to your Site24x7 account.
- Download and install the Site24x7 Server Monitoring agent (Windows).
- 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.
Log pattern
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 |