From 54db9d7d4e5d9e5fadbb035c2f0f0d69d7e25e7c Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 27 Jun 2006 17:46:06 +0000 Subject: [PATCH] Changed over to the new logging style. The static methods remain to support old code but new code should use the new logging style: import static com.threerings.presents.Log.log; and call log.info(), log.warning(), etc. We can migrate old code as the desire grips us. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4231 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/Log.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/presents/Log.java b/src/java/com/threerings/presents/Log.java index ae270e121..9a5a24ffa 100644 --- a/src/java/com/threerings/presents/Log.java +++ b/src/java/com/threerings/presents/Log.java @@ -21,19 +21,22 @@ package com.threerings.presents; +import java.util.logging.Level; +import java.util.logging.Logger; + /** - * A placeholder class that contains a reference to the log object used by - * the Presents services. + * Contains a reference to the log object used by the Presents services. */ public class Log { - public static com.samskivert.util.Log log = - new com.samskivert.util.Log("presents"); + /** We dispatch our log messages through this logger. */ + public static Logger log = + Logger.getLogger("com.threerings.narya.presents"); /** Convenience function. */ public static void debug (String message) { - log.debug(message); + log.fine(message); } /** Convenience function. */ @@ -51,6 +54,6 @@ public class Log /** Convenience function. */ public static void logStackTrace (Throwable t) { - log.logStackTrace(com.samskivert.util.Log.WARNING, t); + log.log(Level.WARNING, t.getMessage(), t); } }