Log4net Logs

Log4net is a widely used logging framework in windows .NET applications. The OpManager Nexus agent automatically detects Log4net logs in your machine and identifies the log fields such as date & time, log level, source file name, line, and message from Log4net. With default support for Log4net logs you can search, view, collect, and analyze the data with the help of our intuitive web client.  Learn more about log management with OpManager Nexus.

Getting started

  1. Log in to your OpManager Nexus account.
  2. Download and install the OpManager Nexus 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. Log4net 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:\\*log4net*\\*.log*
Note

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

Log pattern

$DateTime:date$ $LogLevel$ $SourceFileName$ $Line:number$ - $Message$

This is the default log pattern defined by OpManager Nexus for parsing Log4net logs based on the sample log mentioned below. 

Sample log

2017-07-02 20:52:39,342 DEBUG className 200 - This is debug message

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

 Field name  Field value
Date Time  2017-07-02 20:52:39, 342
Log Level DEBUG
Source File Name  className
Line 200
Message This is debug message
Shortlink has been copied!