logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramadoss Chinnakuzhandai" <ramadoss.chinnakuzhan...@wipro.com>
Subject Centralized configuration file for log4j
Date Thu, 10 Apr 2003 09:27:58 GMT

Hi,
        I have something interesting to ask you guys...well in my project we are using log4j
for logging..the interesting thing is that every subsystem in this project routed to different
type of logging for example subsystem1 should go to File which resides on the same subsystem's
machine, and subsystem2 should go to JMS Queue(centralized logging)from where I process JMS
Message then I store it into dB or File.

Since logging itself a separate service it has to register itself in admin service along with
a subsystem which uses this  API. 

Step 1: All other subsystems in the project should obtain logger instance to log data
        e.g. Logger logger = VehLogger.getLogger(xyz.class, context) where VehLogger is the
class which I extended from Logger or log4j,xyz.class is loggername and context refer the
subsystem eg.subsystem1.

Step 2:while obtaining logger instance it goes VehLogger class where I identify the subsystem
by identifying the context and pass that context in JNDI look of admin service to obtain configuration
file specific to that subsystem finally configure that file using DOMConfigurator i.e. a xml
file containing appender as File,MaxFileSize =100kb and MaxBackupIndex = 2 for that subsystem1.

Step 3:Proceding logging based on that configuration file like log data goes to File and MaxFileSize=100kb
and MaxBackupIndex=2 etc.

I just wondering is it correct approach....while considering configuration file located in
remote Admin server..?? if not is there any other way to do this other than the one I mentioned
above and  more importantly how good/bad this approach interms of performance like every time
I have to JNDI lookup for the configuration file of Admin to build config file with respect
to each subsystem then configure that file and do appending...?????

Greatly appreciate all your views and suggestions....

Cheers :-)
Ram

-----Original Message-----
From: Ceki Gülcü [mailto:ceki@qos.ch] 
Sent: Wednesday, April 09, 2003 9:02 PM
To: Log4J Users List
Subject: Re: AsyncAppender with JMSAppender



Is JMSAppender working correctly in standalone mode, that is without being 
embedded within an AsyncAppender?

At 07:22 PM 4/9/2003 +0530, you wrote:


>Hi,
>        I wanted to ask you guys in my application I had to use 
>AsyncAppender to support asynchronicity of logging for that I attached 
>FileAppender and JMSAppender to AsyncAppender JMSAppneder is not 
>actually dispatching to JMSQ while FileAppender is working fine..
>
>Any clue ???
>
>
>-----Original Message-----
>From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
>Sent: Wednesday, April 09, 2003 7:04 PM
>To: Log4J Users List
>Subject: RE: Priority.getAllPossiblePriorities() bug reported yet?
>
>
>
>Howdy,
>I couldn't find such a bug in Bugzilla, so feel free to enter it if you 
>want ;)  (Of course, even I did find something you could still feel 
>free to enter another ;))
>
>However, I would point out the method javadoc says it will return an 
>array of Level objects.  So I disagree with your interpretation of the 
>bug.  A possible fix might be Priority[] getAllPossiblePriorities() {
>   Return new Level[] {Level.FATAL, ...};
>}
>
>And regardless, I would caution you not to rely on this method as I 
>doubt it'll be around in log4j 1.3.
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
> >-----Original Message-----
> >From: DJohnson@desknetinc.com [mailto:DJohnson@desknetinc.com]
> >Sent: Wednesday, April 09, 2003 9:12 AM
> >To: log4j-user@jakarta.apache.org
> >Subject: Priority.getAllPossiblePriorities() bug reported yet?
> >
> >I just discovered that Priority.getAllPossiblePriorities() in 1.2.8 
> >is
>not
> >only deprecated, but broken.  A quick search in bugzilla gave me
>nothing,
> >but I don't have enough faith in my skills there to be sure...  
> >Before
>I
> >enter this in bugzilla, has anyone else already reported it?  The bug
>is
> >using Level.WARN instead of Priority.WARN, as you can see below.
> >  Priority[] getAllPossiblePriorities() {
> >    return new Priority[] {Priority.FATAL, Priority.ERROR, Level.WARN,
> >                           Priority.INFO, Priority.DEBUG};
> >  }
> >
> >__________________________________________________________________
> >David S. Johnson
> >DeskNet Inc.
> >66 Pearl Street, Suite 300
> >Portland, ME  04101
> >Phone:  207-772-1484 x13
> >http://www.desknetinc.com
> > Harness the Power of Your Content
>
>
>
>This e-mail, including any attachments, is a confidential business 
>communication, and may contain information that is confidential, 
>proprietary and/or privileged.  This e-mail is intended only for the
>individual(s) to whom it is addressed, and may not be saved, copied, 
>printed, disclosed or used by anyone else.  If you are not the(an) 
>intended recipient, please immediately delete this e-mail from your 
>computer system and notify the sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>**************************Disclaimer***********************************
>*
>
>Information contained in this E-MAIL being proprietary to Wipro Limited 
>is 'privileged' and 'confidential' and intended for use only by the 
>individual
>  or entity to which it is addressed. You are notified that any use, copying
>or dissemination of the information contained in the E-MAIL in any manner
>whatsoever is strictly prohibited.
>
>***********************************************************************
>****
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki  For log4j documentation consider "The complete log4j manual"
       http://www.qos.ch/shop/products/clm_t.jsp 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


**************************Disclaimer************************************

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message