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 class
A logger to combine multiple other loggers.static class
A logger that does nothing.static class
A logger that wraps around a print stream.static class
A 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 TypeMethodDescriptionvoid
clear()
Clears the log.getLog()
Returns the activity log.Returns the activity log string.boolean
Returns whether to log to standard out/err.void
Called when activity has something to say (forwards to listeners).void
Called when activity has something to say (forwards to listeners).void
read
(InputStream anInputStream) Tells the logger to read from input stream.void
setLogToStandard
(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, toString
Methods 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.
-