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:
@@ -21,21 +21,22 @@
|
|||||||
|
|
||||||
package com.threerings.media;
|
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
|
* A placeholder class that contains a reference to the log object used by
|
||||||
* the media services package.
|
* the media services package.
|
||||||
*/
|
*/
|
||||||
public class Log
|
public class Log
|
||||||
{
|
{
|
||||||
public static final String PACKAGE = "media";
|
/** We dispatch our log messages through this logger. */
|
||||||
|
public static Logger log = Logger.getLogger("com.threerings.media");
|
||||||
public static com.samskivert.util.Log log =
|
|
||||||
new com.samskivert.util.Log(PACKAGE);
|
|
||||||
|
|
||||||
/** Convenience function. */
|
/** Convenience function. */
|
||||||
public static void debug (String message)
|
public static void debug (String message)
|
||||||
{
|
{
|
||||||
log.debug(message);
|
log.fine(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Convenience function. */
|
/** Convenience function. */
|
||||||
@@ -53,11 +54,6 @@ public class Log
|
|||||||
/** Convenience function. */
|
/** Convenience function. */
|
||||||
public static void logStackTrace (Throwable t)
|
public static void logStackTrace (Throwable t)
|
||||||
{
|
{
|
||||||
log.logStackTrace(com.samskivert.util.Log.WARNING, t);
|
log.log(Level.WARNING, t.getMessage(), t);
|
||||||
}
|
|
||||||
|
|
||||||
public static int getLevel ()
|
|
||||||
{
|
|
||||||
return com.samskivert.util.Log.getLevel(PACKAGE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,9 +80,6 @@ public class RegionManager
|
|||||||
if ((Math.abs(x) > Integer.MAX_VALUE/2) || (Math.abs(y) > Integer.MAX_VALUE/2)) {
|
if ((Math.abs(x) > Integer.MAX_VALUE/2) || (Math.abs(y) > Integer.MAX_VALUE/2)) {
|
||||||
Log.warning("Requested to dirty questionable region " +
|
Log.warning("Requested to dirty questionable region " +
|
||||||
"[rect=" + StringUtil.toString(rect) + "].");
|
"[rect=" + StringUtil.toString(rect) + "].");
|
||||||
if (Log.getLevel() == Log.log.DEBUG) {
|
|
||||||
Thread.dumpStack();
|
|
||||||
}
|
|
||||||
return; // Let's not do it!
|
return; // Let's not do it!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user