Authored by jack.lee

no message

... ... @@ -7,7 +7,6 @@
<property name="yoho.env.servertype" defaultValue="jboss" description="应用服务器类型(jboss or tomcat)"/>
<property name="yoho.env.serverhome" defaultValue="/usr/local/jboss" description="应用服务器(jboss or tomcat)安装路径"/>
<property name="petstore.env.serverport" defaultValue="0" description="应用端口"/>
<property name="petstore.env.webapphome" defaultValue="/home/login/petstore" description="应用根目录"/>
<property name="petstore.env.namespace" defaultValue="petstore" description="应用命名空间"/>
<property name="petstore.env.productmode" defaultValue="PRODUCT" description="PRODUCT-生产环境 / TEST-测试环境 / DEV-开发环境"/>
</group>
... ...
... ... @@ -69,6 +69,24 @@
<build>
<plugins>
<plugin>
<groupId>com.yoho.tools</groupId>
<artifactId>maven-autoconfig-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<configuration>
<exploding>false</exploding>
<dest>${basedir}/src/main</dest>
<type>Directory</type>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>autoconfig</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.9</version>
... ...
<?xml version="1.0" encoding="UTF-8"?>
<config>
<group>
<property name="petstore.env.webapphome" defaultValue="/home/login/petstore/deploy" description="应用根目录"/>
<property name="petstore.log.level" defaultValue="INFO" description="log级别"/>
<property name="petstore.log.root" defaultValue="${petstore.env.webapphome}/logs" description="log根目录"/>
</group>
<script>
<generate template="META-INF/autoconf/logback.xml" destfile="WEB-INF/classes/logback.xml"/>
</script>
</config>
... ...
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator> <!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator -->
<expression>logger.contains("springframework")</expression>
</evaluator>
<OnMismatch>NEUTRAL</OnMismatch>
<OnMatch>DENY</OnMatch>
</filter>
<encoder charset="UTF-8">
<pattern>%-4r - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n </pattern>
</encoder>
</appender>
<appender name="PETSTORE-ALL" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${petstore.log.root}/petstore-all.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>petstore-all.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%-1relative - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} -- %msg%n</pattern>
</encoder>
</appender>
<appender name="PETSTORE-TIMEOUT-SQL" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${petstore.log.root}/petstore-timeout-sql.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>petstore-timeout-sql.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%-1relative - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} -- %msg%n</pattern>
</encoder>
</appender>
<appender name="PETSTORE-TIMEOUT-REQUEST" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${petstore.log.root}/petstore-timeout-request.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>petstore-timeout-request.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>5MB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%-1relative - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} -- %msg%n</pattern>
</encoder>
</appender>
<!-- ===================================================================== -->
<!-- 以下是logger的定义 -->
<!-- ===================================================================== -->
<logger name="com.taobao.sample.petstore.dal.dao.ibatis.IbatisGenericDaoImpl" additivity="true">
<level value="DEBUG"/>
<appender-ref ref="PETSTORE-TIMEOUT-SQL"/>
</logger>
<logger name="com.milanoo.zeus.web.filter.timer.TimerFilter" additivity="true">
<level value="WARN"/>
<appender-ref ref="PETSTORE-TIMEOUT-REQUEST"/>
</logger>
<!-- ===================================================================== -->
<!-- Root logger的定义 -->
<!-- ===================================================================== -->
<root level="${petstore.log.level}">
<appender-ref ref="STDOUT" />
<appender-ref ref="PETSTORE-ALL" />
</root>
</configuration>
\ No newline at end of file
... ...