Help Docs

Log4net Logs

Log4net is a widely used logging framework in windows .NET applications. The Site24x7 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 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. 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*

 

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$ $SourceFileName$ $Line:number$ - $Message$

This is the default log pattern defined by Site24x7 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 Site24x7.

 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

Related log types

Was this document helpful?

Shortlink has been copied!