Package com.inductiveautomation.rm.base
Class RMLogger
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.base.RMLogger
- All Implemented Interfaces:
RMPropertyChanger,Cloneable
- Direct Known Subclasses:
RMLogger.CompositeLogger,RMLogger.NoOp,RMLogger.PrintStreamLogger
This class provides a simple abstraction for logging messages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA logger to combine multiple other loggers.static classA logger that does nothing.static classA logger that wraps around a print stream.static classA class to read lines from a given input stream in a separate thread and print them. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the log.getLog()Returns the activity log.Returns the activity log string.booleanReturns whether to log to standard out/err.voidCalled when activity has something to say (forwards to listeners).voidCalled when activity has something to say (forwards to listeners).voidread(InputStream anInputStream) Tells the logger to read from input stream.voidsetLogToStandard(boolean aValue) Sets whether to log to standard out/err.Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toStringMethods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Field Details
-
out
-
err
-
nop
-
-
Constructor Details
-
RMLogger
public RMLogger()
-
-
Method Details
-
getLog
Returns the activity log. -
getLogString
Returns the activity log string. -
getLogToStandard
public boolean getLogToStandard()Returns whether to log to standard out/err. -
setLogToStandard
public void setLogToStandard(boolean aValue) Sets whether to log to standard out/err. -
read
Tells the logger to read from input stream. -
print
Called when activity has something to say (forwards to listeners). -
println
Called when activity has something to say (forwards to listeners). -
clear
public void clear()Clears the log.
-