edu.berkeley.nlp.lm.util
Class Logger.SystemLogger

java.lang.Object
  extended by edu.berkeley.nlp.lm.util.Logger.SystemLogger
All Implemented Interfaces:
Logger.LogInterface
Enclosing class:
Logger

public static class Logger.SystemLogger
extends Object
implements Logger.LogInterface

Logs to System.out and System.err

Author:
Aria Haghighi

Constructor Summary
Logger.SystemLogger()
           
Logger.SystemLogger(PrintStream out, PrintStream err)
           
Logger.SystemLogger(String outFile, String errFile)
           
 
Method Summary
 void close()
           
 void dbg(String s)
           
 void endTrack()
          Ends a track, printing out how long the track took.
 void err(String s)
           
 void err(String s, Object... args)
           
 void logs(String s)
           
 void logs(String s, Object... args)
          Log a string, but only once in a while.
 void logss(String s)
          Always log this string.
 void logss(String string, Object... args)
           
 void startTrack(String s)
          Start a track (a function, or some other logical unit of computation) with a name given by s.
 void warn(String s)
           
 void warn(String string, Object... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Logger.SystemLogger

public Logger.SystemLogger(PrintStream out,
                           PrintStream err)

Logger.SystemLogger

public Logger.SystemLogger(String outFile,
                           String errFile)
                    throws FileNotFoundException
Throws:
FileNotFoundException

Logger.SystemLogger

public Logger.SystemLogger()
Method Detail

close

public void close()

dbg

public void dbg(String s)
Specified by:
dbg in interface Logger.LogInterface

endTrack

public void endTrack()
Description copied from interface: Logger.LogInterface
Ends a track, printing out how long the track took.

Specified by:
endTrack in interface Logger.LogInterface

err

public void err(String s)
Specified by:
err in interface Logger.LogInterface

logs

public void logs(String s)

logss

public void logss(String s)
Description copied from interface: Logger.LogInterface
Always log this string.

Specified by:
logss in interface Logger.LogInterface

startTrack

public void startTrack(String s)
Description copied from interface: Logger.LogInterface
Start a track (a function, or some other logical unit of computation) with a name given by s.

Specified by:
startTrack in interface Logger.LogInterface

warn

public void warn(String s)
Specified by:
warn in interface Logger.LogInterface

logs

public void logs(String s,
                 Object... args)
Description copied from interface: Logger.LogInterface
Log a string, but only once in a while. This is useful when we are logging frequently and only wish to see lines every second or so. How often logging is done is up to the implementation.

Specified by:
logs in interface Logger.LogInterface
Parameters:
s - printf style string
args - printf args

err

public void err(String s,
                Object... args)
Specified by:
err in interface Logger.LogInterface

warn

public void warn(String string,
                 Object... args)
Specified by:
warn in interface Logger.LogInterface

logss

public void logss(String string,
                  Object... args)
Specified by:
logss in interface Logger.LogInterface