Greenrain API uses log4net for logging messages, warning and errors. The following points help understanding how the logging is implemented:
- Configuration for log4net is described in section Installation Manual.
- Log files are located in the following folder:
- Environment.SpecialFolder.CommonDocuments\Greenrain\MNC Framework\Log.
- You can also use Windows Environment Variable CSIDL_COMMON_DOCUMENTS that refers to the file-system directory that contains documents that are common to all users. A typical path is C:\Users\Public\Documents.
- In C#, you can use this variable to refer to this folder:
Environment.SpecialFolder.CommonDocuments\Greenrain\MNC Framework\Log
.
- Environment.SpecialFolder.CommonDocuments\Greenrain\MNC Framework\Log.
- Log files names have the following naming convention: Greenrain Medical Necessity Checks Framework yyyy-MM-dd.{Process ID}.log, where:
- yyyy-MM-dd – current date.
- {Process ID} – process id of the running application.
- Examples:
- Greenrain Medical Necessity Checks Framework 2020-08-20.1890.log
- Greenrain Medical Necessity Checks Framework 2020-08-20.9202.log
- Greenrain Medical Necessity Checks Framework 2020-08-21.4930.log
- Logging levels are described in the table below.
- Recommendation for setting up the logging level:
- When debugging, your code set the minimum level to DEBUG, so you get all logging from Greenrain MNC API.
- In production, set the logging level to WARN, so you get only Warnings, Errors and Fatal logging messages.
ALL | DEBUG | INFO | WARN | ERROR | FATAL | OFF |
---|---|---|---|---|---|---|
ALL | ||||||
DEBUG | DEBUG | |||||
INFO | INFO | INFO | ||||
WARN | WARN | WARN | WARN | |||
ERROR | ERROR | ERROR | ERROR | ERROR | ||
FATAL | FATAL | FATAL | FATAL | FATAL | FATAL | |
OFF | OFF | OFF | OFF | OFF | OFF | OFF |