Created
October 11, 2010 15:38
-
-
Save softprops/620723 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Generic logging behavior trait */ | |
trait Logged { | |
import java.util.logging._ | |
private val log = net.lag.logging.Logger.get | |
def trace(msg: => String) = log ifTrace(msg) | |
def trace(t:Throwable, msg: => String) = log ifTrace(t, msg) | |
def info(msg: => String) = log ifInfo(msg) | |
def info(t:Throwable, msg: => String) = log ifInfo(t, msg) | |
def warn(msg: => String) = log ifWarning(msg) | |
def warn(t:Throwable, msg: => String) = log ifWarning(t, msg) | |
def err(msg: => String) = log ifError(msg) | |
def err(t:Throwable, msg: => String) = log ifError(t, msg) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment