Turning log4j.properties into log4j.xml and tuning things to avoid Tomcat's DEBUG statement polluting the log file
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/a13a0d86 Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/a13a0d86 Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/a13a0d86 Branch: refs/heads/master Commit: a13a0d865f6240190f60909bbdd37739d407f3d7 Parents: fce2155 Author: Francesco Chicchiriccò <--global> Authored: Mon Aug 4 12:07:01 2014 +0200 Committer: Francesco Chicchiriccò <--global> Committed: Mon Aug 4 12:07:01 2014 +0200 ---------------------------------------------------------------------- fit/src/main/resources/log4j.properties | 23 ------------ fit/src/main/resources/log4j.xml | 53 ++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/a13a0d86/fit/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/fit/src/main/resources/log4j.properties b/fit/src/main/resources/log4j.properties deleted file mode 100644 index 0b0bb4d..0000000 --- a/fit/src/main/resources/log4j.properties +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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. -# -log4j.rootLogger=DEBUG, FILE -log4j.appender.FILE=org.apache.log4j.RollingFileAppender -log4j.appender.FILE.File=${project.build.directory}/emb-tom-fit/fit.log -log4j.appender.FILE.layout=org.apache.log4j.PatternLayout -log4j.appender.FILE.layout.ConversionPattern=[%-5p] %r %c - %m%n http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/a13a0d86/fit/src/main/resources/log4j.xml ---------------------------------------------------------------------- diff --git a/fit/src/main/resources/log4j.xml b/fit/src/main/resources/log4j.xml new file mode 100644 index 0000000..5af23dd --- /dev/null +++ b/fit/src/main/resources/log4j.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration PUBLIC + "-//APACHE//DTD LOG4J 1.2//EN" + "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd"> +<!-- +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. +--> +<log4j:configuration debug="true" + xmlns:log4j='http://jakarta.apache.org/log4j/'> + + <appender name="fitlog" class="org.apache.log4j.RollingFileAppender"> + <param name="append" value="false"/> + <param name="file" value="${project.build.directory}/emb-tom-fit/fit.log"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %C:%L - %m%n"/> + </layout> + </appender> + + <logger name="org.apache.tomcat"> + <level value="ERROR" /> + <appender-ref ref="fitlog"/> + </logger> + <logger name="org.apache.catalina"> + <level value="ERROR" /> + <appender-ref ref="fitlog"/> + </logger> + + <logger name="org.apache.cxf"> + <level value="ERROR" /> + <appender-ref ref="fitlog"/> + </logger> + + <root> + <level value="DEBUG"/> + <appender-ref ref="fitlog"/> + </root> + +</log4j:configuration> \ No newline at end of file
