brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/2] brooklyn-server git commit: Update Karaf logging configuration.
Date Tue, 12 Jul 2016 10:44:26 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master ae4a3a1eb -> e16842b77


Update Karaf logging configuration.

Updates org.ops4j.pax.logging.cfg to be configured similarly to the logback.xml configuration
with regular launcher.

Update JcloudsPropertiesFromBrooklynProperties noisy debug logger to be trace level.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/7d288f45
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/7d288f45
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/7d288f45

Branch: refs/heads/master
Commit: 7d288f45f50cd40c84c32434e9b31bd9ed1325eb
Parents: 10613d1
Author: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Authored: Sat Jul 9 14:10:18 2016 +0100
Committer: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Committed: Mon Jul 11 09:50:18 2016 +0100

----------------------------------------------------------------------
 .../resources/etc/org.ops4j.pax.logging.cfg     | 65 +++++++++++++++++---
 ...JcloudsPropertiesFromBrooklynProperties.java |  2 +-
 2 files changed, 58 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/7d288f45/karaf/apache-brooklyn/src/main/resources/etc/org.ops4j.pax.logging.cfg
----------------------------------------------------------------------
diff --git a/karaf/apache-brooklyn/src/main/resources/etc/org.ops4j.pax.logging.cfg b/karaf/apache-brooklyn/src/main/resources/etc/org.ops4j.pax.logging.cfg
index 26de433..acd2aea 100755
--- a/karaf/apache-brooklyn/src/main/resources/etc/org.ops4j.pax.logging.cfg
+++ b/karaf/apache-brooklyn/src/main/resources/etc/org.ops4j.pax.logging.cfg
@@ -18,29 +18,78 @@
 ################################################################################
 
 # Root logger
-log4j.rootLogger=INFO, out, osgi:VmLogAppender
+log4j.rootLogger=INFO, out, debugFile, osgi:VmLogAppender
 log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
 
 # CONSOLE appender not used by default
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C
%4L | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %-5.5p %3.3X{bundle.id} %-30.30c{2}
[%-16.16t] %m%n
 
-# File appender
+# Info file appender
 log4j.appender.out=org.apache.log4j.RollingFileAppender
 log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32C %4L
| %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
-log4j.appender.out.file=${karaf.home}/log/brooklyn.log
+log4j.appender.out.layout.ConversionPattern=%d{ABSOLUTE} %-5.5p %3.3X{bundle.id} %-30.30c{2}
[%-16.16t] %m%n
+log4j.appender.out.file=${karaf.home}/log/brooklyn.info.log
+log4j.appender.out.Threshold=INFO
 log4j.appender.out.append=true
-log4j.appender.out.maxFileSize=1MB
+log4j.appender.out.maxFileSize=100MB
 log4j.appender.out.maxBackupIndex=10
 
+# Debug file appender
+log4j.appender.debugFile=org.apache.log4j.RollingFileAppender
+log4j.appender.debugFile.layout=org.apache.log4j.PatternLayout
+log4j.appender.debugFile.layout.ConversionPattern=%d{ABSOLUTE} %-5.5p %3.3X{bundle.id} %-30.30c{2}
[%-16.16t] %m%n
+log4j.appender.debugFile.file=${karaf.home}/log/brooklyn.debug.log
+log4j.appender.debugFile.append=true
+log4j.appender.debugFile.maxFileSize=100MB
+log4j.appender.debugFile.maxBackupIndex=10
+
 # Sift appender
 log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
 log4j.appender.sift.key=bundle.name
 log4j.appender.sift.default=brooklyn
 log4j.appender.sift.appender=org.apache.log4j.FileAppender
 log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t |
%-32.32c{1} | %-32.32C %4L | %m%n
+log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} %-5.5p %3.3X{bundle.id}
%-30.30c{2} [%-16.16t] %m%n
 log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
-log4j.appender.sift.appender.append=true
\ No newline at end of file
+log4j.appender.sift.appender.append=true
+
+
+# Logger configuration
+
+# The following properties turn on quite verbose DEBUG logging for Brooklyn-relevant loggers
+log4j.logger.brooklyn=DEBUG
+log4j.logger.org.apache.brooklyn=DEBUG
+log4j.logger.org.jclouds=DEBUG
+log4j.logger.jclouds=DEBUG
+io.cloudsoft.winrm4j.winrm.WinRmTool=DEBUG
+
+# If you're just going to have a few debug categories these are recommended;
+# comment out the loggers above and leave these as-is
+log4.logger.brooklyn.SSH=DEBUG
+log4.logger.brooklyn.location.basic.jclouds=DEBUG
+log4.logger.brooklyn.util.internal.ssh=DEBUG
+log4.logger.org.apache.brooklyn.SSH=DEBUG
+log4.logger.org.apache.brooklyn.location.basic.jclouds=DEBUG
+log4.logger.org.apache.brooklyn.util.internal.ssh=DEBUG
+
+# a bit noisy at INFO, but still, poss interesting
+log4j.logger.org.reflections.Reflections=INFO
+log4j.logger.com.sun.jersey.server.impl.application=INFO
+log4j.logger.org.apache.whirr.service.ComputeCache=INFO
+log4j.logger.jclouds.ssh=INFO
+log4j.logger.org.apache.http.impl.client=INFO
+log4j.logger.javax.management.remote=INFO
+
+# some loggers are very noisy however, exclude them
+log4j.logger.org.apache.cxf=WARN
+log4j.logger.net.schmizz=WARN
+log4j.logger.org.eclipse.jetty=WARN
+log4j.logger.org.mongodb.driver=WARN
+
+#  Wordnik logs errors in a few places which aren't errors at all; ignore them altogether
+# (Turn them back on if you need to see how API-doc gets generated, and also
+# see https://github.com/wordnik/swagger-core/issues/58)
+log4j.logger.com.wordnik.swagger=OFF
+

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/7d288f45/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPropertiesFromBrooklynProperties.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPropertiesFromBrooklynProperties.java
b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPropertiesFromBrooklynProperties.java
index b00d004..3bf5403 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPropertiesFromBrooklynProperties.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPropertiesFromBrooklynProperties.java
@@ -119,7 +119,7 @@ public class JcloudsPropertiesFromBrooklynProperties extends LocationPropertiesF
                     // 0.7.0 25 Feb -- previously we switched to provider2 in this case,
but that was wrong when
                     // working with chains of names; not sure why this case would ever occur
(apart from tests which have been changed)
                     // 28 Mar seen this warning many times but only in cases when NOT changing
is the right behaviour 
-                    LOG.debug(JavaClassNames.niceClassAndMethod()+" NOT changing provider
from "+provider+" to candidate "+provider2);
+                    LOG.trace(JavaClassNames.niceClassAndMethod()+" NOT changing provider
from "+provider+" to candidate "+provider2);
                 }
             }
         }


Mime
View raw message