diff --git a/jube/pom.xml b/jube/pom.xml index bdfbe6a..af4d509 100644 --- a/jube/pom.xml +++ b/jube/pom.xml @@ -167,7 +167,7 @@ org.slf4j - slf4j-jdk14 + slf4j-log4j12 1.7.5 diff --git a/jube/src/main/java/io/fabric8/jube/main/Main.java b/jube/src/main/java/io/fabric8/jube/main/Main.java index f83b871..cf3b323 100644 --- a/jube/src/main/java/io/fabric8/jube/main/Main.java +++ b/jube/src/main/java/io/fabric8/jube/main/Main.java @@ -47,11 +47,6 @@ */ public final class Main { - private static final String JUBE_VERSION = System.getenv("JUBE_VERSION") != null ? System.getenv("JUBE_VERSION") : "LATEST"; - private static final String FABRIC8_VERSION = System.getenv("FABRIC8_VERSION") != null ? System.getenv("FABRIC8E_VERSION") : "LATEST"; - - private static final String JUL_LOGGING_FORMAT = "%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s %2$s %5$s%6$s%n"; - private static final String LOGO = "\t________ ______\n" + "\t______(_)____ _____ /_ _____\n" + @@ -70,7 +65,6 @@ public static void main(final String[] args) throws Exception { try { System.setProperty("hawtio.authenticationEnabled", "false"); System.setProperty("org.eclipse.jetty.util.log.class", Slf4jLog.class.getName()); - System.setProperty("java.util.logging.SimpleFormatter.format", JUL_LOGGING_FORMAT); String port = Systems.getEnvVarOrSystemProperty("HTTP_PORT", "HTTP_PORT", "8585"); Integer portNumber = Integer.parseInt(port); diff --git a/jube/src/main/resources/log4j.properties b/jube/src/main/resources/log4j.properties new file mode 100644 index 0000000..3a3f5d6 --- /dev/null +++ b/jube/src/main/resources/log4j.properties @@ -0,0 +1,40 @@ +# +# Copyright 2005-2014 Red Hat, Inc. +# +# Red Hat 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. +# + +# +# The logging properties +# +log4j.rootLogger=INFO, file, out + +#log4j.logger.io.fabric8=DEBUG + +# CONSOLE appender not used by default +log4j.appender.out=org.apache.log4j.ConsoleAppender +log4j.appender.out.layout=org.apache.log4j.PatternLayout +log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n +# MDC +#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %-10.10X{breadcrumbId} - %-10.10X{exchangeId} - %-10.10X{correlationId} - %-10.10X{routeId} - %m%n + +# File appender +log4j.appender.file=org.apache.log4j.FileAppender +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.file=logs/container.log +log4j.appender.file.append=true +log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n +# MDC +#log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %-10.10X{breadcrumbId} - %-10.10X{exchangeId} - %-10.10X{correlationId} - %-10.10X{routeId} - %m%n + +log4j.throwableRenderer=org.apache.log4j.EnhancedThrowableRenderer diff --git a/jube/src/main/resources/logging.properties b/jube/src/main/resources/logging.properties deleted file mode 100644 index 7ab093f..0000000 --- a/jube/src/main/resources/logging.properties +++ /dev/null @@ -1,22 +0,0 @@ -# -# Copyright 2005-2014 Red Hat, Inc. -# -# Red Hat 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. -# - -.level = INFO -org.eclipse.jetty.level = INFO -org.eclipse.jetty.server.Server.level = INFO -org.apache.zookeeper.server.level = WARN -org.apache.zookeeper.Environment.level = WARN -org.apache.deltaspike.level = WARN