logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gulcu <...@urbanet.ch>
Subject Re: Need help.
Date Tue, 09 Jan 2001 12:56:27 GMT
At 19:03 09.01.2001 +0800, you wrote:
>     I have 2 questions here abt log4j:
>1- When i tried to put this statement
><load-on-startup>1</load-on-startup> at Testing.class(servlet) in
>web.xml ? But i got an error on the tomcat saying "cannot load servlet
>name Testing" when i startup my tomcat ! but it isn't any problems when
>i use the example servlet(provided by log4j) like HelloWorldExample !
>That really give me a big headache, what wrong with that huh ?


I am not aware of any servlet examples provided by log4j. Where did you see 

>2- How can i actually integrate all my classes to use the configuration
>files ? But, it's not a good practice, by calling the configuration file
>in every of the classes ?

No, it  is not a good practice because parsing the configuration file is 
comparatively slow. More importantly, if the same configuration file is 
called multiple times they will "accumulate" and you will get duplicates in 
the output. One of the advantages of log4j is that categories inherit 
properties from their parents. Thus, you should not need to configure each 
category independently. By the way, have you had a change to look at the 
log4j user manual? Regards, Ceki 

View raw message