Advanced Logging for Bitbucket

Many system administration problems can be easily solved by analyzing log files. Two things are required for that:

  1. Logging level needs to set to most detailed level
  2. Access is required to the log file to see new messages.

Java provides 7 logging levels (DEBUG, INFO, WARN, ERROR, FATAL, OFF, TRACE) and these levels can be set for entire JVM or to particular software packages. Build in Bitbucket features allow you to enable debug level for hardcoded set of packages which lead to issues like:

Plugin introduces new tab in system administration area for customization of log level config

Advanced Logging for Bitbucket

Advanced Logging for Bitbucket

Another problem is access to logs. To access information from log files on the fly you need ssh access to Bitbucket server. It usually requires extra software on Windows and configuring ssh keys. It also introduces some security issues as person who has ssh access can do a lot of other thing besides just viewing log files.

So to solve this problem plugin introduces second tab - Last log

Advanced Logging for Bitbucket

Page displays fixed amount of messages added to log files. New information is added automatically as page performs background queries. There is dropdown to select log file (If system is configured to write several log files)