Beginning update to add GUI logging.

This commit is contained in:
Jonathan Bernard
2010-04-02 05:43:04 -05:00
parent 5b3e2066a2
commit dbb2121525
11 changed files with 547 additions and 39 deletions

View File

@ -24,16 +24,16 @@ import org.apache.log4j.Logger
GriffonPlatformHelper.tweakForNativePlatform(app)
SwingBuilder.lookAndFeel('system', 'nimbus', ['metal', [boldFonts: false]])
Logger.metaClass.traceIfEnabled = { String message, Throwable t = null ->
Logger.metaClass.traceIfEnabled = { Closure c, Throwable t = null ->
if (delegate.isTraceEnabled()) {
if (t != null) delegate.trace(message, t)
else delegate.trace(message)
if (t != null) delegate.trace(c.call(), t)
else delegate.trace(c.call())
}
}
Logger.metaClass.debugIfEnabled = { String message, Throwable t = null ->
Logger.metaClass.debugIfEnabled = { Closure c, Throwable t = null ->
if (delegate.isDebugEnabled()) {
if (t != null) delegate.debug(message, t)
else delegate.debug(message)
if (t != null) delegate.debug(c.call(), t)
else delegate.debug(c.call())
}
}