Logging settings
JewelSuite uses the Serilog logging services for the output of .NET log statements in a structured way. The primary intention of configuring the logging service would be to capture application information that is generated when the application crashes, or any other issue is preventing the application from operating as expected. In this case, information related to the issue can be found in a trace file, located by default in the C:\Users\[user]\AppData\Local\Baker Hughes\Logs directory, and provided to the JewelSuite support team. If, however, there are other reasons for changing the logging configuration, such as diagnostics and metrics, see https://serilog.net/ regarding the various logging levels and loggers that can be configured. The logging service can also be used for reporting of the UsageStatistics.
By default, one log file is created, independent of how many instances of the application are open simultaneously. If you want to generate a log file for each instance of the application, you can do so by adjusting the serilog.json file in the configuration folder of the application. The ‘path’ parameter of a ‘File’ logger must be extended with ‘{ProcessId}’ to add the process ID to the log file name.
Logging to a central logging system
When you have a central logging system, e.g. ELK stack, you probably need extra information for filtering your log messages. For this, there are additional structured log fields available like
- ThreadID
- MachineName
- UserName (on Windows this includes the domain name)
- ProcessId
- ProcessName
- SessionId (this will add a unique id, created new whenever the application starts, to any log message)
- SolutionId (this will add the unique id of a solution to any log message)
- StackTrace
You can add this extra information in a log-file by adjusting the serilog.json file in the configuration folder of the application.