添加CAS自定义日志范围

CAS服务端的spring-configuration文件夹下的log4jConfiguration.xml里面配置了具体的日志配置文件指向

<bean id="log4jInitialization" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
         <property name="targetClass" value="org.springframework.util.Log4jConfigurer"/>
         <property name="targetMethod" value="initLogging"/>
         <property name="arguments">
             <list>
                 <value>${log4j.config.location:classpath:log4j.xml}</value>
                 <value>${log4j.refresh.interval:60000}</value>
             </list>
         </property>
    </bean>
找到log4j.xml(在WEB-INF的classes目录下)

添加自定义日志范围即可

<logger name="com.mypackage" additivity="true">
        <level value="INFO" />
        <appender-ref ref="cas" />
</logger>



你可能感兴趣的:(添加CAS自定义日志范围)