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
,java.lang.Cloneable
- Direct Known Subclasses:
RMLogger.CompositeLogger
,RMLogger.NoOp
,RMLogger.PrintStreamLogger
public class RMLogger extends RMObject
This class provides a simple abstraction for logging messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RMLogger.CompositeLogger
A logger to combine multiple other loggers.static class
RMLogger.NoOp
A logger that does nothing.static class
RMLogger.PrintStreamLogger
A logger that wraps around a print stream.static class
RMLogger.Reader
A class to read lines from a given input stream in a separate thread and print them.
-
Constructor Summary
Constructors Constructor Description RMLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears the log.java.lang.StringBuffer
getLog()
Returns the activity log.java.lang.String
getLogString()
Returns the activity log string.boolean
getLogToStandard()
Returns whether to log to standard out/err.void
print(java.lang.String aString)
Called when activity has something to say (forwards to listeners).void
println(java.lang.String aString)
Called when activity has something to say (forwards to listeners).void
read(java.io.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
-
-
-
-
Method Detail
-
getLog
public java.lang.StringBuffer getLog()
Returns the activity log.
-
getLogString
public java.lang.String 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
public void read(java.io.InputStream anInputStream)
Tells the logger to read from input stream.
-
print
public void print(java.lang.String aString)
Called when activity has something to say (forwards to listeners).
-
println
public void println(java.lang.String aString)
Called when activity has something to say (forwards to listeners).
-
clear
public void clear()
Clears the log.
-
-