NDC or MDC might be what you want. They're a way of adding contextual info to your messages without having to do something like Logger.info(key + message). The trick is that NDCs are associated with a thread and if you're doing EJB calls you need another way to propagate the context, or key in your case.
-----Original Message----- From: Jitendra Kharche [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:44 AM To: Log4J Users List Subject: Customizing pattern Hi All, I am using the pattern "Date Priority [Category] Message\n". I want to modify this pattern to add a key as a prefix to each log statement e.g. "Key Date Priority [Category] Message\n". I want to use this key to group log statements. Log statements having same key will be grouped and indicates the audit record of processing of a event occured in the system. Is this possible? Can someone help me? Or there is any other better way of achieving this type of functionality? Can I configure Chainsaw to group log statements based on this or some other criteria. Regards, Jitendra --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]