[Schmitzm-commits] r1308 - trunk/src/schmitzm/lang

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 24 22:57:46 CET 2010


Author: alfonx
Date: 2010-11-24 22:57:45 +0100 (Wed, 24 Nov 2010)
New Revision: 1308

Modified:
   trunk/src/schmitzm/lang/LangUtil.java
Log:
Trying to reduce the lob level of libs:


		// Reducing the for libraries.. TODO could be
		// Math.min(loglevel+2,LEVEL.ERROR)
		Logger.getLogger("javax.faces").setLevel(Level.WARN);
		Logger.getLogger("com.sun.faces").setLevel(Level.WARN);
		Logger.getLogger("org.hibernate").setLevel(Level.WARN);
		Logger.getLogger("net.sf.ehcache.hibernate").setLevel(Level.WARN);


Modified: trunk/src/schmitzm/lang/LangUtil.java
===================================================================
--- trunk/src/schmitzm/lang/LangUtil.java	2010-11-24 18:04:47 UTC (rev 1307)
+++ trunk/src/schmitzm/lang/LangUtil.java	2010-11-24 21:57:45 UTC (rev 1308)
@@ -1404,30 +1404,40 @@
 			StackTraceElement[] stackTrace, int depth) {
 		printLastStackTraceClasses(stackTrace, depth, System.out);
 	}
-	
-	
+
 	/**
-	 * Initializes the {@link Logger} (root logger) with a default {@link ConsoleAppender}.
-	 * This method does nothing when the root logger already contains
-	 * an appender, so it does not matter when this method is called twice or
-	 * more.
-	 * @param logLevel log level (if {@code null} the level {@link Level#DEBUG}
-	 *                        is used)
-	 * @param logPattern pattern for the console output (if {@code null} a default pattern
-	 *                   "%r\t%p\t%c\t%m%n" is used)
+	 * Initializes the {@link Logger} (root logger) with a default
+	 * {@link ConsoleAppender}. This method does nothing when the root logger
+	 * already contains an appender, so it does not matter when this method is
+	 * called twice or more.
+	 * 
+	 * @param logLevel
+	 *            log level (if {@code null} the level {@link Level#DEBUG} is
+	 *            used)
+	 * @param logPattern
+	 *            pattern for the console output (if {@code null} a default
+	 *            pattern "%r\t%p\t%c\t%m%n" is used)
 	 */
 	public static void initializeDefaultLogger(Level logLevel, String logPattern) {
-	  if ( Logger.getRootLogger().getAllAppenders().hasMoreElements() )
-	    return;
-	  
-	  if ( logPattern == null )
-	    logPattern = "%r\t%p\t%c\t%m%n";
-	  if ( logLevel == null )
-	    logLevel = Level.DEBUG;
-	  Layout   appenderLayout  = new PatternLayout(logPattern);
-	  Appender appender = new ConsoleAppender(appenderLayout, "System.out"); 
-      Logger.getRootLogger().addAppender(appender);
-      Logger.getRootLogger().setLevel(logLevel);
+		if (Logger.getRootLogger().getAllAppenders().hasMoreElements())
+			return;
+
+		if (logPattern == null)
+			logPattern = "%r\t%p\t%c\t%m%n";
+		if (logLevel == null)
+			logLevel = Level.DEBUG;
+		Layout appenderLayout = new PatternLayout(logPattern);
+		Appender appender = new ConsoleAppender(appenderLayout, "System.out");
+		Logger.getRootLogger().addAppender(appender);
+		Logger.getRootLogger().setLevel(logLevel);
+
+		// Reducing the for libraries.. TODO could be
+		// Math.min(loglevel+2,LEVEL.ERROR)
+		Logger.getLogger("javax.faces").setLevel(Level.WARN);
+		Logger.getLogger("com.sun.faces").setLevel(Level.WARN);
+		Logger.getLogger("org.hibernate").setLevel(Level.WARN);
+		Logger.getLogger("net.sf.ehcache.hibernate").setLevel(Level.WARN);
+
 	}
 
 	/**



More information about the Schmitzm-commits mailing list