a separate log file. Similarly, I wanted to have CONFIG, SECURITY,
BUSINESSACTIVITY, >PERFORMANCE custom log levels in the same level below DEBUG.
I think you would be better served, as James points out, by using different logging hierachies: Create different loggers for different stuff, for example: Logger normalLogger = Logger.getLogger(this.getClass()); Logger configLogger = Logger.getLogger("CONFIG."+this.getClass()); Logger securityLogger = Logger.getLogger("SECURITY."+this.getClass()); and so on - and then, instead of doing: normalLogger.log(MyCustomLevel.CONFIG,logMessage); normalLogger.log(MyCustomLevel.SECURITY,logMessage); do this: configLogger.log(logMessage); securityLogger.log(logMessage); It has the added flexibility that you can now categorize levels within your CONFIG, SECURITY, etc, loggers. For example: try{ loadConfiguration(); configLogger.info("Configuration loaded"); } catch (Exception e){ configLogger.fatal("Failed to load configuration",e); } both logging messages would be dispatched to whatever appenders you choose to attach to the CONFIG hierachy, and they are correctly priorized (not loading the configuration is more urgent than normally loading it) And you don't have to implement your separate Level extension. You just turn off additivity at the CONFIG, SECURITY, etc Logger and that way it doesn't pollute your root logger with those kinds of messages. Level should be used to separate priority between logging messages. If the classification you are trying to make is "intended audience", then conceptually the way to go is different loggers, not different levels. -- Javier González Nicolini --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]