Logging Configuration
The inspectIT Ocelot agent uses Logback library for logging. It comes with the default logging configuration that can be manipulated using configuration properties. The default logback configuration appends inspectIT logs to the console and writes two types of log files:
- agent.log- includes the complete log
- exceptions.log- includes only- WARNand- ERRORlevel messages
The file appenders use the rolling policy with a max file size of 20MB and a history of 30 files.
The available properties for manipulating the default logging configuration are the following:
| Property | Default | Description | 
|---|---|---|
| inspectit.logging.trace | false | Sets the inspectIT Ocelot log level to TRACE. | 
| inspectit.logging.debug | false | Sets the inspectIT Ocelot log level to DEBUGonly if it's not already set toTRACE. | 
| inspectit.logging.console.enabled | true | Defines if the console output is enabled. | 
| inspectit.logging.console.pattern | - | Sets a custom logback pattern for console output. | 
| inspectit.logging.file.enabled | true | Defines if the file appenders are enabled. | 
| inspectit.logging.file.pattern | - | Sets a custom logback pattern for file output. | 
| inspectit.logging.file.path | - | Sets a path where agent.logandexceptions.logfiles are created. By default, the path is resolved to$java.io.tmp/inspectit-ocelotdirectory, falling back to/tmp/inspectit-ocelotif$java.io.tmpSystem property is not defined. | 
| inspectit.logging.file.include-service-name | true | When truethe service name defined in theinspectit.service-nameis included in the log messages appended to files. | 
If you are not satisfied with default logback configuration options you can supply your own logback config file in the property inspectit.logging.config-file.
This way the properties specified in the table above are not taken into account.