Log files of all .Net components and utilities are written to text files located in the logs folders:
/etc/indeed/indeed-pam/logs/Component_name/C:\inetpub\wwwroot\pam\Component_name\logs\C:\Program Files\Indeed\Indeed PAM\Gateway\ProxyApp\logs\[indeed-pam-windows\MISC]\utilities folder\logs\Description of the log files of the components: Core, IDP, LS
| File | core | idp | LS | log content |
|---|---|---|---|---|
| commands.log | + | + | all logs of the commands | |
| queries.log | + | + | all logs of the queries | |
| errors.log | + | + | + | all errors of the PAM/LS |
| jobs.log | + | all logs of the jobs | ||
| events.log | + | all logs related to Events | ||
| connections.log | + | all logs of service connections | ||
| db.log | + | + | + | all logs related to DB access |
| hangfire.log | + | + | + | all logs from Hangfire |
| ils.log | + | all logs from LogServer client | ||
| full-yyyy-MM-dd.log | + | + | + | all logs of PAM/LS with logger name and traceId |
| stdout_yyyyMMddHHmmss_xxxx.log | + | + | + | logs with errors from IIS |
Logs are written to the folder: C:\Program Files\Indeed\Indeed PAM\Gateway\ProxyApp\logs\shortDate\processId to separate logs from multiple runs on the same day. It is possible that there are two log files in the folder:
ffmpeg.log — debugging information from ffmpegPam.Proxy.App.log — all other logsAll logs are written to the one file. Log file name doesn't contain a date. Log file name contains the name of the utility. For example: Pam.Tools.Migrator.log
The list of the native components is following:
To enable/receive logs, you can use the Indeed GetLog utility. Logs are saved to a directory C:\\Windows\\System32\\LogFiles\\Indeed-ID. Each process has its own separate directory.
All logs are written to the one file — ${ISODate}.log.
File location: /etc/indeed/indeed-pam/logs/ssh/
All logs generated by our code are written to the one file — ${ISODate}.log.
File location: /opt/Indeed-PAM/pamsu/logs/.
In addition, it is possible to enable logging of code provided by sudo. This is done via changes to the file /etc/pamsu.conf. The rules for setting up and managing are the same as for sudo. See man sudo.conf.
A json file is used for logging configuration (appsettings.json).
File appsettings.json locates at:
The variables parameter is a section where you can set variables to further configure logging. The number of variables is unlimited. This parameter is optional.
"variables": {
"minLevel": "Trace",
"dbMinLevel": "Info"
} |
The value of a variable can be inserted into an attribute value via the |
Each log entry has a level. And each logger is configured to include or ignore certain levels. A common configuration is to specify the minimum level where that level and higher levels are included. For example, if the minimum level is Info, then Info, Warn, Error and Fatal are logged, but Debug and Trace are ignored.
The log levels ordered by severity:
LogLevel | Ordinal | Severity |
|---|---|---|
Trace | 0 | Most verbose level. Used for development and seldom enabled in production. |
Debug | 1 | Debugging the application behavior from internal events of interest. |
Info | 2 | Information that highlights progress or application lifetime events. |
Warn | 3 | Warnings about validation issues or temporary failures that can be recovered. |
Error | 4 | Errors where functionality has failed or Exception have been caught. |
Fatal | 5 | Most critical level. Application is about to abort. |
The common configuration is to specify a minimum level in which this level and higher levels are included. For example, if the minimum level is Info, then Info, Warn, Error and Fatal are registered, but Debug and Trace are ignored.
Each type of log has its own name, which is not recommended to edit.
"Rules": {
"03_Hangfire": {
"logger": "Hangfire.*",
"minLevel": "Info",
"writeTo": "hangfireFile",
"final": true
},
"20_Errors": {
"logger": "*",
"minLevel": "Error",
"writeTo": "errorsFile"
},
"40_Commands": {
"logger": "Idp.Application.*Command",
"minLevel": "${minLevel}",
"writeTo": "commandsFile",
"Enabled": false
},
} |
For each type of log, you can specify the following tags:
Each component that records logs has a file NLog.json, which specifies where and how logs will be recorded.
For Windows NLog.json file locates in the same path as the appsettings file.json and is configured for each component separately.
Parameter variables - sets the value of a configuration variable. The number of variables is unlimited. (optional parameter).
Each type of log has its own name, which is not recommended to edit.
type — The type of the saved log. Editing is not recommended.
| The directory for recording and storing logs is specified in one of two formats "C:\Logs\logs.log" or "C:\\LogsArch\\logs.{#####}.log". {#####} specified only in archiveFileName parameter. This is necessary for numbering filled logs. |
If log rotation is enabled, then the directory of the recorded log and the directory of the filled logs must be different. |
Example of configuration for errors log:
"targets":{
"errorsFile": {
"type": "File",
"layout": "${loggerLayout}",
"fileName": "C:\Logs\errors.log",
"archiveFileName": "C:\\LogsArch\\errors.{#####}.log",
"archiveAboveSize": 1000000,
"archiveNumbering": "Sequence",
"maxArchiveFiles": 2
}
} |
Log rotation is not enabled by default.