On 8/11/06, Madduri, Murthy <[EMAIL PROTECTED]> wrote:
We have hierarchical logging in our applications. But, this requirement is to have the logs grouped based on a custom level. For a typical configuration transaction, the logger can record messages from various hierarchies. We are not guaranteed of the sequence of messages in this whole transaction. We are pretty much getting all the messages, but, they ended up mixing with other trace statements.For example, if we have a new custom log level, can we use that in <logger> configuration like this? <logger name="com.logging.test"> <!-- Logging level (i.e. WARN) for this logger: --> <level value="CONFIG" /> <!-- File appender for this logger: --> <appender-ref ref="fileAppender" /> </logger>
You could, but that (I think) would mean you get all the messages of level config and above, unless you make config higher than fatal. What you could do is have an appender that is dedicated to these config messages, make config lower priority than DEBUG, add filters to accept only config messages in that appender, and then set the threshold of the other loggers above config. (root logger set at config level) That way, the "normal" appenders don't log config, and the config appender logs only config. -- Javier González Nicolini --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
