| <?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 for asynchronous logging --> |
| <Configuration> |
| <Properties> |
| <Property name="appenderToUse">${sys:LOG4J_APPENDER:-MainLogFile}</Property> |
| </Properties> |
| |
| <Appenders> |
| |
| <Console name="STDOUT" target="SYSTEM_OUT"> |
| <PatternLayout> |
| <Pattern> |
| %maxLen{%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{node_name} %X{core}] %c{1.} %m%notEmpty{ =>%ex{short}}}{10240}%n |
| </Pattern> |
| </PatternLayout> |
| <!-- <LogstashLayout dateTimeFormatPattern="yyyy-MM-dd'T'HH:mm:ss.SSSZZZ" |
| eventTemplateUri="classpath:LogstashJsonEventLayoutV1.json" |
| prettyPrintEnabled="true" |
| stackTraceEnabled="true"/> --> |
| </Console> |
| |
| <RollingRandomAccessFile |
| name="MainLogFile" |
| fileName="${sys:solr.log.dir}/solr.log" |
| filePattern="${sys:solr.log.dir}/solr.log.%i"> |
| <PatternLayout> |
| <Pattern> |
| %maxLen{%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{node_name} %X{core}] %c{1.} %m%notEmpty{ =>%ex{short}}}{10240}%n |
| </Pattern> |
| </PatternLayout> |
| <!-- <LogstashLayout dateTimeFormatPattern="yyyy-MM-dd'T'HH:mm:ss.SSSZZZ" |
| eventTemplateUri="classpath:LogstashJsonEventLayoutV1.json" |
| prettyPrintEnabled="true" |
| stackTraceEnabled="true"/> --> |
| <Policies> |
| <OnStartupTriggeringPolicy/> |
| <SizeBasedTriggeringPolicy size="64 MB"/> |
| </Policies> |
| <DefaultRolloverStrategy max="20"/> |
| </RollingRandomAccessFile> |
| |
| <RollingRandomAccessFile |
| name="SlowLogFile" |
| fileName="${sys:solr.log.dir}/solr_slow_requests.log" |
| filePattern="${sys:solr.log.dir}/solr_slow_requests.log.%i"> |
| <PatternLayout> |
| <Pattern> |
| %maxLen{%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{node_name} %X{core}] %c{1.} %m%notEmpty{ =>%ex{short}}}{10240}%n |
| </Pattern> |
| </PatternLayout> |
| <!-- <LogstashLayout dateTimeFormatPattern="yyyy-MM-dd'T'HH:mm:ss.SSSZZZ" |
| eventTemplateUri="classpath:LogstashJsonEventLayoutV1.json" |
| prettyPrintEnabled="true" |
| stackTraceEnabled="true"/> --> |
| <Policies> |
| <OnStartupTriggeringPolicy/> |
| <SizeBasedTriggeringPolicy size="64 MB"/> |
| </Policies> |
| <DefaultRolloverStrategy max="20"/> |
| </RollingRandomAccessFile> |
| |
| <RollingRandomAccessFile |
| name="DeprecationLogFile" |
| fileName="${sys:solr.log.dir}/solr_deprecation.log" |
| filePattern="${sys:solr.log.dir}/solr_deprecation.log.%i"> |
| <PatternLayout> |
| <Pattern> |
| %maxLen{%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{node_name} %X{core}] %c{1.} %m%notEmpty{ =>%ex{short}}}{10240}%n |
| </Pattern> |
| </PatternLayout> |
| <!-- <LogstashLayout dateTimeFormatPattern="yyyy-MM-dd'T'HH:mm:ss.SSSZZZ" |
| eventTemplateUri="classpath:LogstashJsonEventLayoutV1.json" |
| prettyPrintEnabled="true" |
| stackTraceEnabled="true"/> --> |
| <Policies> |
| <OnStartupTriggeringPolicy/> |
| <SizeBasedTriggeringPolicy size="64 MB"/> |
| </Policies> |
| <DefaultRolloverStrategy max="2"/> |
| </RollingRandomAccessFile> |
| |
| </Appenders> |
| <Loggers> |
| <AsyncLogger name="org.eclipse.jetty.servlets" level="WARN"/> |
| <AsyncLogger name="org.eclipse.jetty" level="WARN"/> |
| <AsyncLogger name="org.eclipse.jetty.server.Server" level="WARN"/> |
| <AsyncLogger name="org.apache.hadoop" level="WARN"/> |
| <AsyncLogger name="org.apache.zookeeper" level="WARN"/> |
| <AsyncLogger name="org.apache.zookeeper.ClientCnxn" level="ERROR"/> |
| <AsyncLogger name="org.apache.zookeeper.server.ZooKeeperCriticalThread" level="OFF"/> |
| |
| <AsyncLogger name="org.apache.solr.update.processor.LogUpdateProcessorFactory" level="WARN"/> |
| <AsyncLogger name="org.apache.solr.update.LoggingInfoStream" level="OFF"/> |
| <AsyncLogger name="org.apache.solr.core.SolrCore.SlowRequest" level="INFO" additivity="false"> |
| <AppenderRef ref="SlowLogFile"/> |
| </AsyncLogger> |
| |
| <AsyncRoot level="INFO"> |
| <AppenderRef ref="${appenderToUse}"/> |
| </AsyncRoot> |
| </Loggers> |
| </Configuration> |