[ 
https://issues.apache.org/jira/browse/LOG4J2-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937411#comment-13937411
 ] 

Bruce Brouwer commented on LOG4J2-510:
--------------------------------------

How do you intend to manage all those log files? Why couldn't you simply log 
the sessionID in each log entry using the MDC and have only one rolling log 
file? I would think you would run into other problems with the file system with 
having thousands, or potentially far more than thousands, of log files sitting 
around. 

I know log management tools like Splunk prefer to watch fewer files. And grep 
will make short work of finding which logs are involved with a particular 
session id. 

> How to close inactive log files
> -------------------------------
>
>                 Key: LOG4J2-510
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-510
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-beta9
>         Environment: linux
>            Reporter: Eric
>              Labels: performance
>             Fix For: 2.0-beta9
>
>
> Hi There,
> in log4j2 when the App start logging it create and open a file to log into 
> and that file stay open as long as the App is running.
> in my case log4j2 create and open too many files base on ThreadContext and 
> the OS (linux) will complaint that too many files are open and my App will 
> crash and stop responding.
> My question is:
>  1 -  how do you close those files with log4j2 if they are inactive for a 
> period of time.
>  2 - How do you have access to the log4j2 handle that open those files.
>  3 - How do you tell log4j2 to open a file just for a period of time.
> Thanks
> Eric



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to