Skip to content

Logging

istonikula edited this page Nov 28, 2014 · 2 revisions

Access log

Access log is implemented using Spring Boot's tomcat specific support, see server.tomcat keys in application.properties.

Application log

In development and continuous integration environments default logback configuration from Spring Boot is used (console logging only). Environments that need file based logging may extend base configuration provided by [logback-parkandrideapi-base.xml] (https://github.com/HSLdevcom/parkandrideAPI/blob/master/application/src/main/resources/logback-parkandrideapi-base.xml). See [logback-template.xml] (https://github.com/HSLdevcom/parkandrideAPI/blob/master/etc/logback-template.xml) for an example.

When explicit logback configuration is used, the logging configuration file and logging directory must be given. This can be accomplished via application properties or command line flags logging.path and logging.config.

The application log includes the following MDC fields

  • srcip: the ip from which the request originated (forwarded by the ELB)
  • username: the authenticated user (if any)
  • requestid: unique id of the request (to help tracking request flow)
Clone this wiki locally