paulonicolau-rj commented on issue #2274:
URL: 
https://github.com/apache/logging-log4j2/issues/2274#issuecomment-1935038152

   > @paulonicolau-rj,
   > 
   > Can you add your full configuration as text? Since all other nodes are 
interpolated using the properties that you provide, the `<Properties>` element 
must be the **first** child of `<Configuration>`.
   
   Yes, follow:
   `<?xml version="1.0" encoding="UTF-8"?>
   
   <Configuration status="warn">
        <CustomLevels>
                <CustomLevel name="EVENT" intLevel="550" />
        </CustomLevels>
   
        <Properties>
                <Property name="basePath">${sys:catalina.home}/logs</Property>
        </Properties>
   
        <Appenders>
                <RollingFile name="eventFile" 
fileName="${basePath}/api-event.log" 
filePattern="${basePath}/api-event-%d{yyyy-MM-dd}.log">
                        <LevelRangeFilter minLevel="EVENT" maxLevel="EVENT" 
onMatch="ACCEPT" onMismatch="DENY"/>
                        <PatternLayout>
                                <pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} 
[%t] %c{1} - %msg%n</pattern>
                        </PatternLayout>
                        <Policies>
                                <TimeBasedTriggeringPolicy interval="1" 
modulate="true" />
                                <SizeBasedTriggeringPolicy size="10MB" />
                        </Policies>
                        <!-- Max 10 files will be created everyday -->
                        <DefaultRolloverStrategy max="10">
                                <Delete basePath="${basePathr}" maxDepth="10">
                                        <!-- Delete all files older than 30 
days -->
                                        <IfLastModified age="30d" />
                                </Delete>
                        </DefaultRolloverStrategy>
                </RollingFile>
                
                <RollingFile name="infoFile" 
fileName="${basePath}/api-info.log" 
filePattern="${basePath}/api-info-%d{yyyy-MM-dd}.log">
                        <LevelRangeFilter minLevel="INFO" maxLevel="INFO" 
onMatch="ACCEPT" onMismatch="DENY"/>
                        <PatternLayout>
                                <pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} 
[%t] %c{1} - %msg%n</pattern>
                        </PatternLayout>
                        <Policies>
                                <TimeBasedTriggeringPolicy interval="1" 
modulate="true" />
                                <SizeBasedTriggeringPolicy size="10MB" />
                        </Policies>
                        <!-- Max 10 files will be created everyday -->
                        <DefaultRolloverStrategy max="10">
                                <Delete basePath="${basePathr}" maxDepth="10">
                                        <!-- Delete all files older than 30 
days -->
                                        <IfLastModified age="30d" />
                                </Delete>
                        </DefaultRolloverStrategy>
                </RollingFile>
   
                <RollingFile name="errorFile" 
fileName="${basePath}/api-error.log" 
filePattern="${basePath}/api-error-%d{yyyy-MM-dd}.log">
                        <LevelRangeFilter minLevel="ERROR" maxLevel="ERROR" 
onMatch="ACCEPT" onMismatch="DENY"/>
                        <PatternLayout>
                                <pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} 
[%t] %c{1} - %msg%n</pattern>
                        </PatternLayout>
                        <Policies>
                                <TimeBasedTriggeringPolicy interval="1" 
modulate="true" />
                                <SizeBasedTriggeringPolicy size="10MB" />
                        </Policies>
                        <!-- Max 10 files will be created everyday -->
                        <DefaultRolloverStrategy max="10">
                                <Delete basePath="${basePathr}" maxDepth="10">
                                        <!-- Delete all files older than 30 
days -->
                                        <IfLastModified age="30d" />
                                </Delete>
                        </DefaultRolloverStrategy>
                </RollingFile>
        </Appenders>
   
        <Loggers>
                <Root level="all" additivity="false">
                        <appender-ref ref="eventFile" level="event"/>
                        <appender-ref ref="infoFile" level="info"/>
                        <appender-ref ref="errorFile" level="error" />
                </Root>
        </Loggers>
   </Configuration>
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to