-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
122 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<configuration scan="true" scanPeriod="30 seconds"> | ||
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"> | ||
<resetJUL>true</resetJUL> | ||
</contextListener> | ||
|
||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
<pattern>%date %level [%thread] %logger{40} %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
<appender name="APP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>logs/nifi-app.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<!-- | ||
For daily rollover, use 'app_%d.log'. | ||
For hourly rollover, use 'app_%d{yyyy-MM-dd_HH}.log'. | ||
To GZIP rolled files, replace '.log' with '.log.gz'. | ||
To ZIP rolled files, replace '.log' with '.log.zip'. | ||
--> | ||
<fileNamePattern>./logs/nifi-app_%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> | ||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | ||
<maxFileSize>100MB</maxFileSize> | ||
</timeBasedFileNamingAndTriggeringPolicy> | ||
<!-- keep 30 log files worth of history --> | ||
<maxHistory>30</maxHistory> | ||
</rollingPolicy> | ||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
<pattern>%date %level [%thread] %logger{40} %msg%n</pattern> | ||
<immediateFlush>true</immediateFlush> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="USER_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>logs/nifi-user.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<!-- | ||
For daily rollover, use 'user_%d.log'. | ||
For hourly rollover, use 'user_%d{yyyy-MM-dd_HH}.log'. | ||
To GZIP rolled files, replace '.log' with '.log.gz'. | ||
To ZIP rolled files, replace '.log' with '.log.zip'. | ||
--> | ||
<fileNamePattern>./logs/nifi-user_%d.log</fileNamePattern> | ||
<!-- keep 30 log files worth of history --> | ||
<maxHistory>30</maxHistory> | ||
</rollingPolicy> | ||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | ||
<pattern>%date %level [%thread] %logger{40} %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<!-- valid logging levels: TRACE, DEBUG, INFO, WARN, ERROR --> | ||
|
||
<logger name="org.apache.nifi" level="INFO"/> | ||
|
||
<!-- Logger for managing logging statements for nifi clusters. --> | ||
<logger name="org.apache.nifi.cluster" level="INFO"/> | ||
|
||
<!-- Logger for logging HTTP requests received by the web server. --> | ||
<logger name="org.apache.nifi.server.JettyServer" level="INFO"/> | ||
|
||
<!-- Logger for managing logging statements for jetty --> | ||
<logger name="org.eclipse.jetty" level="INFO"/> | ||
|
||
<!-- Suppress non-error messages due to excessive logging by class or library --> | ||
<logger name="com.sun.jersey.spi.container.servlet.WebComponent" level="ERROR"/> | ||
<logger name="com.sun.jersey.spi.spring" level="ERROR"/> | ||
<logger name="org.springframework" level="ERROR"/> | ||
|
||
<!-- | ||
Logger for capturing user events. We do not want to propagate these | ||
log events to the root logger. These messages are only sent to the | ||
user-log appender. | ||
--> | ||
<logger name="org.apache.nifi.security.authentication.NiFiAuthenticationEntryPoint" level="INFO" additivity="false"> | ||
<appender-ref ref="USER_FILE"/> | ||
</logger> | ||
<logger name="org.apache.nifi.security.authorization" level="INFO" additivity="false"> | ||
<appender-ref ref="USER_FILE"/> | ||
</logger> | ||
<logger name="org.apache.nifi.security.x509" level="INFO" additivity="false"> | ||
<appender-ref ref="USER_FILE"/> | ||
</logger> | ||
<logger name="org.apache.nifi.web.api.config.AccessDeniedExceptionMapper" level="INFO" additivity="false"> | ||
<appender-ref ref="USER_FILE"/> | ||
</logger> | ||
<logger name="org.apache.nifi.authorization" level="INFO" additivity="false"> | ||
<appender-ref ref="USER_FILE"/> | ||
</logger> | ||
<logger name="org.apache.nifi.cluster.authorization" level="INFO" additivity="false"> | ||
<appender-ref ref="USER_FILE"/> | ||
</logger> | ||
<logger name="org.apache.nifi.web.api.config" level="INFO" additivity="false"> | ||
<appender-ref ref="USER_FILE"/> | ||
</logger> | ||
<logger name="org.apache.nifi.web.filter.RequestLogger" level="INFO" additivity="false"> | ||
<appender-ref ref="USER_FILE"/> | ||
</logger> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="APP_FILE"/> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
|
||
</configuration> |