mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-02 20:02:29 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			160 lines
		
	
	
		
			5.9 KiB
		
	
	
	
		
			XML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			160 lines
		
	
	
		
			5.9 KiB
		
	
	
	
		
			XML
		
	
	
		
			Executable File
		
	
	
	
	
<?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">
 | 
						|
 | 
						|
   <!-- ================================= -->
 | 
						|
   <!-- 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{1.}] (%t:%x) %m%n"/>
 | 
						|
      </layout>
 | 
						|
   </appender>
 | 
						|
 | 
						|
   <appender name="INFO-FILE" class="org.apache.log4j.rolling.RollingFileAppender">
 | 
						|
      <param name="Append" value="false"/>
 | 
						|
      <param name="Threshold" value="INFO"/>
 | 
						|
      <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
 | 
						|
        <param name="FileNamePattern" value="/var/log/cloudstack/management/management-server-info.log.%d{yyyy-MM-dd}.gz"/>
 | 
						|
        <param name="ActiveFileName" value="/var/log/cloudstack/management/management-server-info.log"/>
 | 
						|
      </rollingPolicy>
 | 
						|
      <layout class="org.apache.log4j.EnhancedPatternLayout">
 | 
						|
         <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{1.}] (%t:%x) (logid:%X{logcontextid}) %m%n"/>
 | 
						|
      </layout>
 | 
						|
   </appender>
 | 
						|
 | 
						|
   <appender name="APISERVER" class="org.apache.log4j.rolling.RollingFileAppender">
 | 
						|
      <param name="Append" value="true"/>
 | 
						|
      <param name="Threshold" value="DEBUG"/>
 | 
						|
      <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{1.}] (%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{1.}] (%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="INFO"/>
 | 
						|
      <layout class="org.apache.log4j.PatternLayout">
 | 
						|
         <param name="ConversionPattern" value="%-5p [%c{1.}] (%t:%x) %m%n"/>
 | 
						|
      </layout>
 | 
						|
   </appender>
 | 
						|
 | 
						|
   <!-- ================ -->
 | 
						|
   <!-- Limit categories -->
 | 
						|
   <!-- ================ -->
 | 
						|
 | 
						|
   <category name="com.cloud">
 | 
						|
     <priority value="DEBUG"/>
 | 
						|
   </category>
 | 
						|
   
 | 
						|
   <category name="org.apache.cloudstack">
 | 
						|
     <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>
 | 
						|
 | 
						|
   <logger name="apiserver.com.cloud" additivity="false">
 | 
						|
      <level value="DEBUG"/>
 | 
						|
      <appender-ref ref="APISERVER"/>
 | 
						|
   </logger>
 | 
						|
 | 
						|
   <!-- Limit the com.amazonaws category to INFO as its DEBUG is verbose -->
 | 
						|
   <category name="com.amazonaws">
 | 
						|
      <priority value="INFO"/>
 | 
						|
   </category>
 | 
						|
 | 
						|
   <!-- Limit the httpclient.wire category to INFO as its DEBUG is verbose -->
 | 
						|
   <category name="httpclient.wire">
 | 
						|
      <priority value="INFO"/>
 | 
						|
   </category>
 | 
						|
 | 
						|
   <!-- ============================== -->
 | 
						|
   <!-- Add or remove these logger for SNMP, this logger is for SNMP alerts plugin -->
 | 
						|
   <!-- ============================== -->
 | 
						|
 | 
						|
   <logger name="org.apache.cloudstack.alerts" additivity="false">
 | 
						|
      <level value="WARN"/>
 | 
						|
      <appender-ref ref="SYSLOG"/>
 | 
						|
      <appender-ref ref="CONSOLE"/>
 | 
						|
      <appender-ref ref="FILE"/>
 | 
						|
      <appender-ref ref="SNMP"/>
 | 
						|
      <appender-ref ref="ALERTSYSLOG"/>
 | 
						|
   </logger>
 | 
						|
 | 
						|
   <!-- ======================= -->
 | 
						|
   <!-- Setup the Root category -->
 | 
						|
   <!-- ======================= -->
 | 
						|
 | 
						|
   <root>
 | 
						|
      <level value="INFO"/>
 | 
						|
      <appender-ref ref="SYSLOG"/>
 | 
						|
      <appender-ref ref="CONSOLE"/>
 | 
						|
      <appender-ref ref="FILE"/>
 | 
						|
      <appender-ref ref="INFO-FILE"/>
 | 
						|
   </root>
 | 
						|
 | 
						|
</log4j:configuration>
 |