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>
 

-----Original Message-----
From: James Stauffer [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 11, 2006 11:46 AM
To: Log4J Users List
Subject: Re: Different Log4j log file(s) based on Logging Level?

Have you considered having separate logging hierarchies instead?  That
is often a better solution.

On 8/11/06, Madduri, Murthy <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> We are using log4j for our core business framework and it works fine.
>
> One of recent requirements is that we need to capture different
logging
> events: very much customized.
>
> For example, they need a Configurations event, Business Activity event
> etc.
>
>
>
> 1)       Is there a way we can extend the org.apache.log4j.Level
class?
> Can we have our own logging levels?
>
> 2)       If so, can we re-direct the different logging levels into
> different log files? For example, all the log statements with
> com.test.logging.Level.CONFIG(a custom level) should be directed to
> myapp-config.log and vice versa.
>
> 3)       In a J2EE application, how can we use a different log4j
> configuration file name, NOT the default log4j.xml or log4j.proprties?
>
>
>
> Any help is appreciated.
>
>
>
> Thanks & Regards
> Murthy Madduri
> * (770)263-1231
> * Email: [EMAIL PROTECTED]
>
>
>
>
>


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to