logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bin Yan" <bx...@health.state.ny.us>
Subject Re: UNIX file handler problem used up on log4j log files
Date Fri, 30 Aug 2002 15:45:53 GMT

We call the PropertyConfigurator each time a servlet is hit and MyLog is
initiated. Maybe that's teh problem?
thx

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Tony Yan (Bin)
 BHNSM/DOH/NYS
 Tel: 518-473-1809
 Email: bxy02@health.state.ny.us

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^





                                                                                         
                                             
                      Ceki Gülcü                                                       
                                               
                      <ceki@qos.ch>            To:       "Log4J Users List" <log4j-user@jakarta.apache.org>
                           
                                               cc:                                       
                                             
                      08/30/2002 11:41         Subject:  Re: UNIX file handler problem used
up on log4j log files                      
                      AM                                                                 
                                             
                      Please respond to                                                  
                                             
                      "Log4J Users                                                       
                                             
                      List"                                                              
                                             
                                                                                         
                                             
                                                                                         
                                             




At 11:18 30.08.2002 -0400, you wrote:

>Hi, Ceki:
>
>We set up appenders using static config. file thru PropertyConfigurator.
>This configuration is done thru MyLog class. Currently, we have only about
>a few appenders. My follow up questions should be:

How many times do you call PropertyConfigurator?

>(1) If we don't close those appenders after each Event, what should we do?
>leave them open for the following events?

Of course.

>(2) If we leave those appenders open, at the IO level, when do we close
>java.io.Writer, say if it is a file appender.

You should close them when you exit the application by calling
LogManager.shutdown()

>Thanks very much
>
>- Tony
>
>
>
>
>
>
>                       Ceki
> Gülcü
>
>                       <ceki@qos.ch>            To:       "Log4J Users
> List" <log4j-user@jakarta.apache.org>
>                                                cc:
>
>                       08/30/2002 10:05         Subject:  Re: UNIX file
> handler problem used up on log4j log files
>                       AM
>
>                       Please respond
> to
>
>                       "Log4J
> Users
>
>                       List"
>
>
>
>
>
>
>
>
>
>
>That doesn't say anything about the way you attach appenders to loggers.
>Or?
>
>At 09:36 30.08.2002 -0400, you wrote:
>
> >Thanks for the reply. Currently, that's how we do it, very simply:
> >
> >  theLog = Category.getInstance(logName.toString());
> >
> >     if (..... ) {
> >         theLog.fatal(theMessage);
> >
> >}
> >
> >
> >
> >
> >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >  Tony Yan (Bin)
> >  BHNSM/DOH/NYS
> >  Tel: 518-473-1809
> >  Email: bxy02@health.state.ny.us
> >
> >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> >
> >
> >
> >
> >
> >
> >                       Ceki
> > Gülcü
> >
> >                       <ceki@qos.ch>            To:       "Log4J Users
> > List" <log4j-user@jakarta.apache.org>
> >                                                cc:
> >
> >                       08/30/2002 09:28         Subject:  Re: UNIX file
> > handler problem used up on log4j log files
> >                       AM
> >
> >                       Please respond
> > to
> >
> >                       "Log4J
> > Users
> >
> >                       List"
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >At 08:52 30.08.2002 -0400, you wrote:
> > >I have a problem with file handler in UNIX. It is related to log4j,
but
> >may
> > >not caused by it.
> > >
> > >There are two web applications running, both using log4j. One is
> > >Solaris/Weblogic and the other
> > >Solaris/iPlanet. The WL one never had problem with file logging. But
the
> > >iPlanet always will have overflow file handler issue and eventually
>after
> > >days the UNIX file resources is used up and appl. get locked.
> > >
> > >I understand log4j is thread safe. I also checked the code of log4j.
It
> > >seems that the files (appenders) get opened and kept open until
> > >specifically get reset() or close(). My question is that
> > >
> > >(a) Should we close the appenders each event is logged? Or we should
> > >justleave them open.
> >
> >No, that would be excruciatingly slow.
> >
> > >(b) For the file hander of UNIX, for one file (appender) why would it
>use
> > >multiple handler for one file? why not use kind of pooling access to
the
> > >file.
> >
> >How do you configure the appenders? Do you dynamically create a large
> >number of appenders without ever closing them?
> >
> > >Please clarify if I have any misunderstandins.
> > >
> > >
> > >Tony Yan
> >
> >--
> >Ceki
> >
> >
> >--
> >To unsubscribe, e-mail:   <
>mailto:log4j-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: <
>mailto:log4j-user-help@jakarta.apache.org>
> >
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <
>mailto:log4j-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: <
>mailto:log4j-user-help@jakarta.apache.org>
>
>--
>Ceki
>
>
>--
>To unsubscribe, e-mail:   <
mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <
mailto:log4j-user-help@jakarta.apache.org>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <
mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <
mailto:log4j-user-help@jakarta.apache.org>

--
Ceki


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






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


Mime
View raw message