Custom LOgger for Glassfish (CLOG)
back to Home Page
The GIT repo now contains:
This version provides a simple class that logs each logger to a separate file. This release is intended as a starting point, with the following still to be addressed in future versions:
- you must use the same logger name in classes that should go to the same file. It's a start but it means that each class can't have it's own logger ....
- log files are also hard coded to be generated to /var/glassfish/log/yyyy.mm/ (c:\glassfish\log\yyyy.mm on windows). This should be configurable per file
- It would be better if the class could be threaded, with separate memory buffer and disk writer threads. AFAIK you have to go with a HK2 module to achieve this with Glassfish (although I did set up a MemoryHandler which was flushed to disk by an EJB @Scheduled task every second ... it worked ... but it seemed to be a kludge rather then a 'proper' solution ! ).
- The formatter is built right into the handler. This should be separate.
- You can't do any configuration (other then a blanket log level for each file) from the logging.properties file.
Stand by for release V2.