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

Janardhan Naidu commented on LOG4J2-3454:
-----------------------------------------

any suggestion here?

> how to force rolling file appender to create a new log file every time when 
> we start the application?
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3454
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3454
>             Project: Log4j 2
>          Issue Type: Question
>    Affects Versions: 2.17.2
>            Reporter: Janardhan Naidu
>            Priority: Major
>
> HI Team, 
>  
> I am in process of migrating the log4j1 to log4j2, where we are rewriting the 
> appenders with the help of AbstractAppender Plugin or using the property 
> file. I have multiple questions regarding this, please help me to resolve the 
> same.
>  # how to force rolling file appender to create a new log file every time 
> when we start the application?  here, consider appenders are configured in 
> property file.
>  # We are rewriting one of the rollingfileappender using the 
> abstractappender/abstractfileappender plugin way, But i am unable to find a 
> method which will get executed before starting of the appender!. in log4j1, 
> we had a method called *checkEntryConditions.* So what is the equalent api in 
> log4j2.?  FYI, we are overriding this method to set all our configurations 
> like backup the old logfile, createnew logger, rolling etc..,
>  # Also, we need to set the ConversionPattern based on the loggername, how we 
> can achieve this.? in log4j1, we were extending patternLayout and overriding 
> the format method to do the same. So how we can acheive this using log4j2? 
>  
> Thanks 
> Janardhan 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to