logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-1476) New line is not appending in file logs
Date Tue, 26 Jul 2016 05:10:20 GMT

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

Remko Popma edited comment on LOG4J2-1476 at 7/26/16 5:09 AM:
--------------------------------------------------------------

This is the configuration of logs which I have used..

{code}
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="ALL" name="" packages="">
  <Properties>
    <Property name="baseDir">D:\Logs\</Property>
  </Properties>
  <Appenders>
	<RollingFile name="RollingFile" append="true" fileName="${baseDir}/app.log" filePattern="${baseDir}/$${date:yyyy-MM}/app-%d{yyyy-MM-dd-HH}-%i.log.gz">
            <PatternLayout pattern="%d{dd/MM/YYYY HH:mm:ss.SSS} [%t] %-5level %logger{36}
%msg %n%n%n"/>
            <Policies>
                <TimeBasedTriggeringPolicy />
                <SizeBasedTriggeringPolicy size="30 MB" />
            </Policies>            
            <DefaultRolloverStrategy max="5">
                <Delete basePath="${baseDir}" maxDepth="3">
                    <IfFileName glob="*/app-*.log.gz">
                        <IfLastModified age="60d" />
                    </IfFileName>
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>
</Appenders>
  <Loggers>
    <Root level="ALL">
      <AppenderRef ref="RollingFile"/>
    </Root>
  </Loggers>
</Configuration>
{code}



was (Author: harishnayak):
This is the configuration of logs which I have used..

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="ALL" name="" packages="">
  <Properties>
    <Property name="baseDir">D:\Logs\</Property>
  </Properties>
  <Appenders>
	<RollingFile name="RollingFile" append="true" fileName="${baseDir}/app.log" filePattern="${baseDir}/$${date:yyyy-MM}/app-%d{yyyy-MM-dd-HH}-%i.log.gz">
            <PatternLayout pattern="%d{dd/MM/YYYY HH:mm:ss.SSS} [%t] %-5level %logger{36}
%msg %n%n%n"/>
            <Policies>
                <TimeBasedTriggeringPolicy />
                <SizeBasedTriggeringPolicy size="30 MB" />
            </Policies>            
            <DefaultRolloverStrategy max="5">
                <Delete basePath="${baseDir}" maxDepth="3">
                    <IfFileName glob="*/app-*.log.gz">
                        <IfLastModified age="60d" />
                    </IfFileName>
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>
</Appenders>
  <Loggers>
    <Root level="ALL">
      <AppenderRef ref="RollingFile"/>
    </Root>
  </Loggers>
</Configuration>

> New line is not appending in file logs
> --------------------------------------
>
>                 Key: LOG4J2-1476
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1476
>             Project: Log4j 2
>          Issue Type: Question
>          Components: Layouts
>    Affects Versions: 2.6.2
>         Environment: Linux kernal system
>            Reporter: Harish HG
>            Priority: Critical
>              Labels: layout
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> New line is not appending in file logs, I used the pattern layout as below
> {code}
> <PatternLayout pattern="%n%d{dd/MM/YYYY HH:mm:ss.SSS} [%t] %-5level %logger{36} %msg%n"/>
> {code}



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

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


Mime
View raw message