Configure Logging
Configure Logging
By default, the SCEP server places its log files in the C:\CMS\logs directory, generates logs at the "Info" logging level and stores logs for two days before deleting them. If you wish to change these defaults:
- On the SCEP server where you wish to adjust logging, open a text editor (e.g. Notepad) using the "Run as administrator" option.
-
In the text editor, browse to open the Nlog.config file for the SCEP server. The file is located in the following directory:
C:\Program Files\Common Files\Keyfactor\Keyfactor SCEP Server -
Your Nlog.config file may have a slightly different layout than shown here, but it will contain the four fields highlighted in the below figure. The fields you may wish to edit are:
-
fileName="C:\CMS\logs\SCEP_Log.txt"
The path and file name of the active SCEP server log file.
If you choose to change the path for storage of the log files, you will need to create the new directory (e.g. D:\CMSLogs) and grant the service account under which the SCEP server application pool runs full control permissions on this directory. -
archiveFileName="C:\CMS\logs\SCEP_Log_Archive_{#}.txt"
The path and file name of previous days' SCEP server log files. The SCEP server rotates log files daily and names the previous files using this naming convention.
-
maxArchiveFiles="2"
The number of archive files to retain before deletion.
-
name="*" minlevel="Info"
The level of log detail that should be generated. The default "Info" level logs error and some informational data but at a minimal level to avoid generating large log files. For troubleshooting, it may be desirable to set the logging level to "Debug" or "Trace". Available log levels (in order of increasing verbosity) are:
-
OFF – No logging
-
FATAL – Log severe errors that cause early termination
-
ERROR – Log severe errors and other runtime errors or unexpected conditions that may not cause early termination
-
WARN – Log errors and use of deprecated APIs, poor use of APIs, "almost" errors, and other runtime situations that are undesirable or unexpected but not necessarily "wrong"
-
INFO – Log all of the above plus runtime events (startup/shutdown)
-
DEBUG – Log all of the above plus detailed information on the flow through the system
-
TRACE – Maximum log information—this option can generate VERY large log files
-
-
Figure 8: NLog.config File