Discussions

EJB design: J2EE application logging level configuration

  1. We have an EJB based J2EE application,verbosity of logging level of the application can be changed through an external configurational/application property change but it requires bouncing the system(application sever/GemStone) to have changes to take into effect.

    Is there a way to change the logging level w/o requiring to bounce the J2EE based system ?

    Please throw your smart advise.

    Thank you,
    Andrew Anand
  2. I assume you've a customized logging module in your application ...... basically in your logging code, you can always check the timestamp of the configuration file about what was the last modification time; then you keep this time and compare with the timestamp again and again.

    Whenever you notice the last modified time of the file is later than the last time you read it, refresh the configuration. In this way, you don't need to bounce the whole app with the change of logging config.
  3. log4j will allow you to change you logging level at runtime without bouncing the server.