| <?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. | |
| --> | |
| <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
| <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> | |
| <throwableRenderer class="com.cloud.utils.log.CglibThrowableRenderer"/> | |
| <!-- ================================= --> | |
| <!-- Preserve messages in a local file --> | |
| <!-- ================================= --> | |
| <!-- A regular appender FIXME implement code that will close/reopen logs on SIGHUP by logrotate FIXME make the paths configurable using the build system --> | |
| <!-- <appender name="FILE" class="org.apache.log4j.rolling.RollingFileAppender"> | |
| <param name="Append" value="true"/> | |
| <param name="Threshold" value="TRACE"/> | |
| <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> | |
| <param name="FileNamePattern" value="@MSLOG@.%d{yyyy-MM-dd}.gz"/> | |
| <param name="ActiveFileName" value="@MSLOG@"/> | |
| </rollingPolicy> | |
| <layout class="org.apache.log4j.EnhancedPatternLayout"> | |
| <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{3}] (%t:%x) %m%n"/> | |
| </layout> | |
| </appender> | |
| --> | |
| <!-- | |
| <appender name="APISERVER" class="org.apache.log4j.rolling.RollingFileAppender"> | |
| <param name="Append" value="true"/> | |
| <param name="Threshold" value="TRACE"/> | |
| <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> | |
| <param name="FileNamePattern" value="@APISERVERLOG@.%d{yyyy-MM-dd}.gz"/> | |
| <param name="ActiveFileName" value="@APISERVERLOG@"/> | |
| </rollingPolicy> | |
| <layout class="org.apache.log4j.EnhancedPatternLayout"> | |
| <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{3}] (%t:%x) %m%n"/> | |
| </layout> | |
| </appender> | |
| --> | |
| <!-- ============================== --> | |
| <!-- Append warnings+ to the syslog if it is listening on UDP port FIXME make sysloghost configurable! --> | |
| <!-- ============================== --> | |
| <!-- | |
| <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender"> | |
| <param name="Threshold" value="WARN"/> | |
| <param name="SyslogHost" value="localhost"/> | |
| <param name="Facility" value="LOCAL6"/> | |
| <layout class="org.apache.log4j.PatternLayout"> | |
| <param name="ConversionPattern" value="%-5p [%c{3}] (%t:%x) %m%n"/> | |
| </layout> | |
| </appender> | |
| --> | |
| <!-- ============================== --> | |
| <!-- Append messages to the console --> | |
| <!-- ============================== --> | |
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> | |
| <param name="Target" value="System.out"/> | |
| <param name="Threshold" value="TRACE"/> | |
| <layout class="org.apache.log4j.PatternLayout"> | |
| <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{3}] (%t:%x) %m%n"/> | |
| </layout> | |
| </appender> | |
| <!-- ================ --> | |
| <!-- Limit categories --> | |
| <!-- ================ --> | |
| <category name="com.cloud"> | |
| <priority value="DEBUG"/> | |
| </category> | |
| <!-- Limit the org.apache category to INFO as its DEBUG is verbose --> | |
| <category name="org.apache"> | |
| <priority value="INFO"/> | |
| </category> | |
| <category name="org"> | |
| <priority value="INFO"/> | |
| </category> | |
| <category name="net"> | |
| <priority value="INFO"/> | |
| </category> | |
| <category name="apiserver.com.cloud"> | |
| <priority value="DEBUG"/> | |
| </category> | |
| <!-- ======================= --> | |
| <!-- Setup the Root category --> | |
| <!-- ======================= --> | |
| <root> | |
| <level value="INFO"/> | |
| <appender-ref ref="CONSOLE"/> | |
| </root> | |
| </log4j:configuration> |