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

Remko Popma commented on LOG4J2-727:
------------------------------------

One idea is to use a system property:
{code}
<PatternLayout>
  <header>${sys:myProperty}</header>
  <pattern>%d %p %c{1.} [%t] %m%n</pattern>
</PatternLayout>
{code}

LOG4J2-581 fixed the issue that the header was only created for the first file; 
it now works on rollover too.

> Need a way to create RollingRandomAccessFileAppender with custom manager
> ------------------------------------------------------------------------
>
>                 Key: LOG4J2-727
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-727
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0
>            Reporter: yair ogen
>
> I have a requirement to dump a header in the beginning of each new rolled 
> file. I'd like to extend RollingRandomAccessFileManagerFactory and set it on 
> the appender I use but I don't see any option to do so.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to