From: <ju...@us...> - 2008-04-15 18:14:52
|
Revision: 6349 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=6349&view=rev Author: julgui Date: 2008-04-15 11:14:49 -0700 (Tue, 15 Apr 2008) Log Message: ----------- Fix: logLevel configuration when >=7 now results in no logging output, unless the logger used does not implement LogLevel interface and it does not report an appropriate loglevel, in which case the system will default to log everything. SFOS-784 Modified Paths: -------------- trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogImpl.java trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogToStreamsImpl.java Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogImpl.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogImpl.java 2008-04-15 15:34:09 UTC (rev 6348) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogImpl.java 2008-04-15 18:14:49 UTC (rev 6349) @@ -261,10 +261,16 @@ loadStartUpLoggers(name, configurationClass, configurationCodeBase, loggersConfiguration); //Set lower level of the two, just in case local logger has its own mechanism to set log level - int i= getLevel(localLog); + int i = 3; + if (localLog instanceof LogLevel) { + i = ((LogLevel)localLog).getLevel(); + } else { + i= getLevel(localLog); + } if (currentLogLevel>i){ setLevel(i); } + System.out.println("Using leveL = " + getLevel()); } catch (Exception ex ){ String msg = "Error during initialization of localLog for LogImpl. Next trying to use Default (LogToFile)"; Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogToStreamsImpl.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogToStreamsImpl.java 2008-04-15 15:34:09 UTC (rev 6348) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogToStreamsImpl.java 2008-04-15 18:14:49 UTC (rev 6349) @@ -122,7 +122,7 @@ /** * The current log level */ - protected int currentLogLevel = 0; + protected int currentLogLevel = 1; /** * The short name of this simple log instance */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |