|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (6)
View Page Historyh3. Logging
This section allows you to choose where and how logs are displayed and archived:
This section allows you to choose where and how logs are displayed and archived. Dropwizard provides a rather customisable configuration system, this is the default for Petals Cockpit:
{code}
- type: cockpit-server-filter-factory
{code}
{code}{*}server.requestLog.appenders* *server.requestLog.appenders* allows to choose where to log all REST requests reaching the server.
*logging.appenders* allows *logging.appenders* allows to choose where to log the application output, you can filter it by logging level. Levels can be *OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.*
* *logging.level* is the global level for the application output, it controls directly what will be found in *logging.appenders.type: file* (_./logs/cockpit.log_)
* *logging.appenders.threshold*(under type: console) is the level that will be displayed in the console from all sources ( except from _org.ow2.petals.cockpit.server.\*_ ). Cannot be set lower than global level.
* *logging.loggers* allows to set specific loggers at independent levels. Here you can set any specific java class or package to the desired level on top of the rest.
This way, by default, output from_ org.ow2.petals.cockpit.server.\*_ java classes (petals cockpit code specifically) will be displayed under INFO level. While global output (from dropwizard framework or other dependencies) will remain at WARN level in the console.
The console filter _cockpit-server-filter-factory_ filters out all output from _org.ow2.petals.cockpit.server.*,_ in order to prevent duplicates from the specific logger it is advised to leave it.