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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user