ccs.utils
Class LogShaper

java.lang.Object
  extended by ccs.utils.LogShaper

public class LogShaper
extends java.lang.Object

Utilities to make the logging mechanism play slightly more nicely than it does by default.


Nested Class Summary
static class LogShaper.ConsoleHandler
          A log handler which puts messages to the correct stream, depending on severity.
static class LogShaper.LogFormatter
          A log formatter which uses the Checkpoint MsgHelper methods to format log entries.
 
Constructor Summary
LogShaper()
           
 
Method Summary
static boolean isDebug(java.util.logging.Logger log)
          Whether the logger is set to a debugging level.
static boolean isInfo(java.util.logging.Logger log)
          Whether the logger is set to an information level.
static boolean isTrace(java.util.logging.Logger log)
          Whether the logger is set to a trace level.
static void shapeLogger(java.util.logging.Logger log)
          Set a logger to use the ConsoleHandler and LogFormatter defined here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogShaper

public LogShaper()
Method Detail

shapeLogger

public static void shapeLogger(java.util.logging.Logger log)
Set a logger to use the ConsoleHandler and LogFormatter defined here. Recommended for apps which don't require anything more sophisticated.


isTrace

public static boolean isTrace(java.util.logging.Logger log)
Whether the logger is set to a trace level. This is defined as FINER or below.


isDebug

public static boolean isDebug(java.util.logging.Logger log)
Whether the logger is set to a debugging level. This is defined as FINE or below.


isInfo

public static boolean isInfo(java.util.logging.Logger log)
Whether the logger is set to an information level. This is defined as INFO or below.