Skip to main content
Last updated September 26, 2011 06:13, by stevenb
Feedicon  

Custom LOgger for Glassfish (CLOG)

Introduction

Glassfish is great for developing and running JavaEE applications. But as your projects get larger, or as you deploy more then one application to a server, the built-in logging just continues to clump all your logs into one file. Often making it very difficult to follow a thread of events from one component within the maelstrom of messages.

CLOG is aimed at allowing each logger to have it's own destination file. Ideally CLOG would be a HK2 (or similar) server level component and, ideally, you would be able to configure which log message logger prefix goes into which log file from the standard logging.properties file. While this is a long term goal, in the short term, the projects aims are much more modest.

  1. produce a set of classes that allow logging to different locations based purely on the logger name used.
  2. produce a simple formatter.
  3. produce a HK2 version of with a memory buffer and disk writing thread (similar to GFLogHandler)
  4. allow configuration of this component from the logging.properties file or a similar configuration file.
  5. devise configuration system to mark which logger prefixes go to wich log file.
  6. ???

Please see the blog entry Adding Custom Handlers to Glassfish V3 loggers for background on Glassfish custom loggers.


News

26-sep-2011 - Version 3 now available in GIT repo. HK2 logger, write to multiple files.


14-feb-2011 - Version 2 work in progress is up on GIT. This includes a simple HK2 hello world as a building block for a HK2 logger.


05-feb-2011 - Version 1 is now available from the GIT repo. A simple class for outputting each logger to a different file.



 
 
Close
loading
Please Confirm
Close