Package edu.berkeley.nlp.lm.util
Class Logger.SystemLogger
java.lang.Object
edu.berkeley.nlp.lm.util.Logger.SystemLogger
- All Implemented Interfaces:
Logger.LogInterface
- Enclosing class:
Logger
Logs to System.out and System.err
- Author:
- Aria Haghighi
-
Constructor Summary
ConstructorsConstructorDescriptionSystemLogger(PrintStream out, PrintStream err) SystemLogger(String outFile, String errFile) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoidendTrack()Ends a track, printing out how long the track took.voidvoidvoidvoidLog a string, but only once in a while.voidAlways log this string.voidvoidstartTrack(String s) Start a track (a function, or some other logical unit of computation) with a name given bys.voidvoid
-
Constructor Details
-
SystemLogger
-
SystemLogger
- Throws:
FileNotFoundException
-
SystemLogger
public SystemLogger()
-
-
Method Details
-
close
public void close() -
dbg
- Specified by:
dbgin interfaceLogger.LogInterface
-
endTrack
public void endTrack()Description copied from interface:Logger.LogInterfaceEnds a track, printing out how long the track took.- Specified by:
endTrackin interfaceLogger.LogInterface
-
err
- Specified by:
errin interfaceLogger.LogInterface
-
logs
-
logss
Description copied from interface:Logger.LogInterfaceAlways log this string.- Specified by:
logssin interfaceLogger.LogInterface- Parameters:
s-
-
startTrack
Description copied from interface:Logger.LogInterfaceStart a track (a function, or some other logical unit of computation) with a name given bys.- Specified by:
startTrackin interfaceLogger.LogInterface- Parameters:
s-
-
warn
- Specified by:
warnin interfaceLogger.LogInterface
-
logs
Description copied from interface:Logger.LogInterfaceLog 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:
logsin interfaceLogger.LogInterface- Parameters:
s- printf style stringargs- printf args
-
err
- Specified by:
errin interfaceLogger.LogInterface
-
warn
- Specified by:
warnin interfaceLogger.LogInterface
-
logss
- Specified by:
logssin interfaceLogger.LogInterface
-