NLog Configuration
Basically, if an application using nLog library, it will generate the application log (text file) via the nLog library (http://nlog-project.org/) at the server side. By default, the Log files is located at the log folder which is under the same folder of the application. The IIS Admin can view this log file via a simple text editor, such as notepad.exe.
There are two folders related to the log files.
NLog folder
This folder contains a series of log files generated during the day. If need to change the log folder location, the IIS admin can change below by replacing “${basedir}/logs” with the preferred folder. Please refer to the sample full nlog.config file below.
<variable name="logDirectory" value="${basedir}/logs"/> ** default value
<variable name="logDirectory" value="z:/logs"/> ** if drive z is mapped to a network drive to a file server.
Archive folder
This folder contains a series of historical log files which are moved from the NLog folder and archived at the Archive folder. If need to change the log archive folder location, the IIS admin can change below by replacing “${logDirectory}/archives/” with the preferred folder. Please refer to the sample full nlog.config file below.
archiveFileName="${logDirectory}/archives/AIS-Blueprint-web-Debug.{#####}.txt"
IIS Admin can configure the nLog configuration in the nlog.config file. The details of the nlog.config file is referred to https://github.com/NLog/NLog/wiki/Configuration-file. Below is the sample of the nlog.config of IT and VAS application diagram.
In the nlog.config file, there are three levels of log files
Debug
Executed queries, the detailed information which is beneficial for debugging codes.
Info
Normal behavior like adding nodes, functions.
Error
For example application crashes / exceptions