How do you configure application logging with glassfish?
I'm new to logging and am trying to implement it in a webapplication using glassfish. I have implemented my own loghandler using JDBC, but how am I supposed to configure the system to make use of it? Glassfish own logging confuses me a bit, should I mix my own config with glassfish's config in logging.properties in the domain folder, or is it somehow possible to have a second logging.properties with only my own settings? I have tried adding my handler to the root logger in glassfish config like this:
glassfish/domains/domain1/config/logging.properties:
handlers=com.company.myapp.util.JDBCLogHandler, java.util.logging.ConsoleHandler
However, my logger
private static final Logger logger = Logger.getLogger(MyClass.class.getName());
list of handlers is null. How can I add the handler without d开发者_StackOverflowoing it programmatically? I have not included the code for the loghandler since it does work when I add it programmatically.
精彩评论