Package org.robwork.sdurw_core
Class LogWriter
- java.lang.Object
-
- org.robwork.sdurw_core.LogWriter
-
- Direct Known Subclasses:
LogBufferedChar
,LogBufferedMsg
,LogFileWriter
,LogMultiWriter
,LogStreamWriter
public class LogWriter extends java.lang.Object
Write interface for Logs
LogWriter provides an output strategy for a log.
-
-
Constructor Summary
Constructors Constructor Description LogWriter(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
void
flush()
Flush methodstatic long
getCPtr(LogWriter obj)
void
setTabLevel(int tabLevel)
Set the tab levelLogWriter
streamOperator(java.lang.String str)
specialized stream operator
2LogWriter
streamOperator(Message msg)
Write Message to log.LogWriter
streamOperator(SWIGTYPE_p_f_r_std__ostream__r_std__ostream pf)
Handle the std::endl and other stream functions.void
write(java.lang.String str)
Writes str to the logvoid
write(Message msg)
Writes msg to the log
Default behavior is to use write(const std::string&) for the standard
streaming representation of msg.
void
writeln(java.lang.String str)
Writes str as a line
By default writeln writes str followed by a '\n'.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(LogWriter obj)
-
delete
public void delete()
-
flush
public void flush()
Flush method
-
setTabLevel
public void setTabLevel(int tabLevel)
Set the tab level
-
write
public void write(java.lang.String str)
Writes str to the log- Parameters:
str
- [in] message to write
-
write
public void write(Message msg)
Writes msg to the log
Default behavior is to use write(const std::string&) for the standard
streaming representation of msg.
- Parameters:
msg
- [in] message to write
-
writeln
public void writeln(java.lang.String str)
Writes str as a line
By default writeln writes str followed by a '\n'. However, logs
are free to implement a line change differently.
-
streamOperator
public LogWriter streamOperator(java.lang.String str)
specialized stream operator
2
-
streamOperator
public LogWriter streamOperator(Message msg)
Write Message to log.- Parameters:
msg
- [in] the message.- Returns:
- a reference to this LogWriter for chaining of stream operators.
-
streamOperator
public LogWriter streamOperator(SWIGTYPE_p_f_r_std__ostream__r_std__ostream pf)
Handle the std::endl and other stream functions.
-
-