Switch to Java's logging facilities.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@254 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2007-05-30 01:18:06 +00:00
parent 59c6998c30
commit 97f6eb7c85
2 changed files with 7 additions and 14 deletions
+7 -11
View File
@@ -21,21 +21,22 @@
package com.threerings.media;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* A placeholder class that contains a reference to the log object used by
* the media services package.
*/
public class Log
{
public static final String PACKAGE = "media";
public static com.samskivert.util.Log log =
new com.samskivert.util.Log(PACKAGE);
/** We dispatch our log messages through this logger. */
public static Logger log = Logger.getLogger("com.threerings.media");
/** Convenience function. */
public static void debug (String message)
{
log.debug(message);
log.fine(message);
}
/** Convenience function. */
@@ -53,11 +54,6 @@ public class Log
/** Convenience function. */
public static void logStackTrace (Throwable t)
{
log.logStackTrace(com.samskivert.util.Log.WARNING, t);
}
public static int getLevel ()
{
return com.samskivert.util.Log.getLevel(PACKAGE);
log.log(Level.WARNING, t.getMessage(), t);
}
}
@@ -80,9 +80,6 @@ public class RegionManager
if ((Math.abs(x) > Integer.MAX_VALUE/2) || (Math.abs(y) > Integer.MAX_VALUE/2)) {
Log.warning("Requested to dirty questionable region " +
"[rect=" + StringUtil.toString(rect) + "].");
if (Log.getLevel() == Log.log.DEBUG) {
Thread.dumpStack();
}
return; // Let's not do it!
}