[ 
https://issues.apache.org/jira/browse/LOG4J2-569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

lital kornfeld updated LOG4J2-569:
----------------------------------

    Description: 
I'm trying to configure a rolling file appender to work with HTMLLayout:

<RollingRandomAccessFile name="RollingFile"
    fileName="logs/app.html" filePattern="logs/app-%i-%d{yyyy-MM-dd-HH}.html">
    <HTMLLayout title="App log" locationInfo="true"/>
    <Policies>
    <TimeBasedTriggeringPolicy interval="12" />
    <SizeBasedTriggeringPolicy size="10 MB" />
    <OnStartupTriggeringPolicy />
    </Policies>
    <DefaultRolloverStrategy max="100" />
</RollingRandomAccessFile>

But the outcome is not as expected. The logs are not formatted in a nice table 
and when I open the log file as text the HTML header is missing.

When I use FileAppender it works fine.

<File name="FileAppender" fileName="logs/agent.html">
        <HTMLLayout title="Agent log" locationInfo="true" />
</File>

  was:
I'm trying to configure a rolling file appender to work with HTMLLayout:

<RollingRandomAccessFile name="RollingFile"
    fileName="logs/app.html" filePattern="logs/app-%i-%d{yyyy-MM-dd-HH}.html">
    <HTMLLayout title="App log" locationInfo="true"/>
    <Policies>
    <TimeBasedTriggeringPolicy interval="12" />
    <SizeBasedTriggeringPolicy size="10 MB" />
    <OnStartupTriggeringPolicy />
    </Policies>
    <DefaultRolloverStrategy max="100" />
</RollingRandomAccessFile>
But the outcome is not as expected. The logs are not formatted in a nice table 
and when I open the log file as text the HTML header is missing.

When I use FileAppender it works fine.

<File name="FileAppender" fileName="logs/agent.html">
        <HTMLLayout title="Agent log" locationInfo="true" />
</File>


> Configuring RollingRandomAccessFile with HTMLLayout does not work as expected
> -----------------------------------------------------------------------------
>
>                 Key: LOG4J2-569
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-569
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders, Layouts
>    Affects Versions: 2.0-rc1
>            Reporter: lital kornfeld
>
> I'm trying to configure a rolling file appender to work with HTMLLayout:
> <RollingRandomAccessFile name="RollingFile"
>     fileName="logs/app.html" filePattern="logs/app-%i-%d{yyyy-MM-dd-HH}.html">
>     <HTMLLayout title="App log" locationInfo="true"/>
>     <Policies>
>     <TimeBasedTriggeringPolicy interval="12" />
>     <SizeBasedTriggeringPolicy size="10 MB" />
>     <OnStartupTriggeringPolicy />
>     </Policies>
>     <DefaultRolloverStrategy max="100" />
> </RollingRandomAccessFile>
> But the outcome is not as expected. The logs are not formatted in a nice 
> table and when I open the log file as text the HTML header is missing.
> When I use FileAppender it works fine.
> <File name="FileAppender" fileName="logs/agent.html">
>         <HTMLLayout title="Agent log" locationInfo="true" />
> </File>



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

---------------------------------------------------------------------
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