Log Manager Module


Log Manager is a module for managing the logging system within OpenMRS. It is primarily for developers who need to be able to modify the logging configuration at run-time, and want easy access to the server log.


  • A log viewer which allows filtering and profiling of logging events
  • Profiling mode which shows time differences between logging events and thread information
  • Generation of an error report from a logging event
  • Loggers can be created and edited at run-time
  • Editable presets for logger configurations
  • Support for almost all log4j appender types (console, file, socket, NT event log, etc.)
  • Intercepts uncaught exceptions and adds logging events for them
  • Easy toggling of Hibernate SQL logging and API profiling


After the module is installed it can be accessed by following the View Server Log or Manage Logging links under the Maintenance heading on the OpenMRS Administration page.

Required privileges

Users who are not system developers will require the following explicit privileges:

  • View Server Log: allows a user to view the server log
  • Manage Server Log: allows a user to manage the logging configuration


As of version 1.2, this module can save the active logging configuration to an external log4j XML file. This file is always placed in OpenMRS application directory and has the name xxx-log4j.xml where xxx is the name of the OpenMRS context path. This file can be edited externally if needs be and can be automatically loaded on module startup to restore the logging configuration.


The following options can be changed from the Options page of the module or as global properties in OpenMRS:

  • Load external configuration on startup: tells the module to load the external log4j.xml when its being started
  • Save external configuration on shutdown: tells the module to save the external log4j.xml when its being shutdown
  • System appender name: the name of the appender which will act as the main appender for the module. This appender will be protected from deletion by users and other modules, and will be the default appender on the viewer page.
  • Always recreate system appender if missing: tells the module to always recreate the system appender if it doesn't exist when module is being started, or when the viewer page is accessed.
  • Log uncaught exceptions: enables intercepting and logging of uncaught exceptions.


Summarized release notes


  • Fixes
    • Fixed breaking the admin page on OpenMRS 1.8+


  • Fixes
    • Fixed add logger button not being enabled
  • Changes
    • Module now requires OpenMRS 1.7+


  • Fixes
    • Fixed EL error on viewer page


  • Fixes
    • Fixed issue preventing install on systems with versions of MySQL earlier than 5.0.60


  • New features
    • Button layout more consistent with OpenMRS core
    • All log4j dependencies into one package
    • Added auto save on module shutdown option
    • Added color coded stack trace for event viewer
    • Added autocomplete for logger fields
  • Changes
    • OpenMRS 1.6.0+ now a requirement
  • Fixes
    • Fixed missing throwables in TXT export from viewer page


  • New features
    • New save configuration function which saves to a file in the OpenMRS application directory
    • Added full support for FileAppender, RollingFileAppender and DailyRollingFileAppender
    • Added new tool to allow injecting of logging events for testing purposes
    • Added links to tools page to allow viewing of log4j.xml files in modules and core
  • Fixes
    • Fixed socket appenders not working with other appenders because of bug in Apache Chainsaw
    • Fixed HTML entities not being escaped in event viewer
    • Fixed minor security issues


  • New features
    • New profiling mode to viewer page
    • Recreates system appender when it detects its deletion by another module
    • Next and previous event controls on event viewer
    • Import and export options for the log4j configuration
    • All appender parameters now configurable
  • Fixes
    • Issues with old server log page after module uninstall
    • Prevents users creating appenders with duplicate names
    • Fixed reload button on tools page when only one module is listed
    • Fixed throwable information missing from error report
  • Known issues
    • Socket appender won't work with Apache Chainsaw when there's a console appender (bug in Chainsaw)
    • Logging settings from Apache Velocity can't be recreated or exported


  • Fixes
    • Fixed Spring compatibility issue with OpenMRS 1.7
    • Fixed error when generating report from an expired logging event


  • Known issues
    • None