logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From renny.ko...@rubixinfotech.com
Subject RE: A design problem!
Date Tue, 01 Nov 2005 17:01:44 GMT
Ken

Another suggestion may be:

1. Setup a "Logger" pool... then have a pointer to the Logger in your main
code.
2. At the start of request processing for a client, set the Logger pointer
to the appropriate logger in the pool, if one exists, or create a new one
and save in the pool
3. After a certain timeout, destroy the logger -- so if no requests are
received from a client in lets say 5 minutes, the logger expires

Renny Koshy
President & CEO

--------------------------------------------
RUBIX Information Technologies, Inc.
www.rubixinfotech.com


                                                                           
             "Jeff Davidson"                                               
             <jeffd.rgs@gmail.                                             
             com>                                                       To 
                                       "'Log4CXX User'"                    
             11/01/2005 11:40          <log4cxx-user@logging.apache.org>   
             AM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         [SPAM] RE: A design problem!        
              "Log4CXX User"                                               
             <log4cxx-user@log                                             
             ging.apache.org>                                              
                                                                           
                                                                           
                                                                           




Ken,

Would it be feasible to write to a (SQL) database appender? Later, you
would
simply query the results for each IP address as needed, instead of forcing
the sorting of log records at the time that they are logged.

I'm very new to log4cxx so I don't really know how much effort would be
required, but if it were me I think I'd want a general solution that
offloads the sorting and processing of individual log records until someone
(me?) actually requests them.

Anyway, it's food for thought.

Cheers,
~Jeff D.


-----Original Message-----
From: Ken [mailto:yongkwai@gmail.com]
Sent: Monday, October 31, 2005 6:27 PM
To: Log4CXX User
Subject: Re: A design problem!

Hello,
    Currently, My program have 1 thread deal with all clients request, have
only one appender with "setFile" call changes the log file for each client
request. But the problem is when I enable the log, the cpu usage is a
little
high, disable the log everything is ok. So I think "setFile" call will
cause
file frequently opened & closed, will this elevate the cpu usage?
     Maarten's NDC suggestion is what I thought before. The problem is each
client will have a series of request, each of them will last variable time.
So NDC may overlap the log content. Create many appender just like Thomas
said will challenge the OS limit. Of course use awk, sed, Excel are the
best
and easy solutions, but for some reason we only can show the log file to
related people with their part. I will study use awk or Excel to achieve
this later. However I still like write to different files. Thanks.

--

Ken




Mime
View raw message