public interface RMILogger extends Remote
Logger
instance
will remain on the machine that created it and its references can be sent to
other connected machines. If the original logger is not reachable a log
operation does not throw RemoteException
and the logging operation
will have no effects.Modifier and Type | Method and Description |
---|---|
static RMILogger |
get(java.lang.Class<?> cls)
Creates a
Logger using the name of the specified class |
static RMILogger |
get(java.lang.Class<?> cls,
java.io.PrintStream printStream)
Creates a
Logger using the name of the specified class and the given
PrintStream on which the logger must print. |
static RMILogger |
get(java.lang.String name)
Creates a
Logger using the specified name |
static RMILogger |
get(java.lang.String name,
java.io.PrintStream printStream)
Creates a
Logger using the specified name and the given
PrintStream on which the logger must print. |
void |
log(java.lang.String format,
java.lang.Object... objects)
Logs a string using the specified format and composed by the specified
objects.
|
void |
logIf(boolean condition,
java.lang.String format,
java.lang.Object... objects)
As
log(String, Object...) logs a string. |
static RMILogger get(java.lang.String name, java.io.PrintStream printStream)
Logger
using the specified name and the given
PrintStream
on which the logger must print.name
- the name of this logger that will be printed aside each
log stringprintStream
- the PrintStream
to log toRMILogger
static RMILogger get(java.lang.Class<?> cls, java.io.PrintStream printStream)
Logger
using the name of the specified class and the given
PrintStream
on which the logger must print.cls
- the class whose name is used as logger name that will be
printed aside each log stringprintStream
- the PrintStream
to log toRMILogger
static RMILogger get(java.lang.String name)
Logger
using the specified namename
- the name of this logger that will be printed aside each log
stringRMILogger
static RMILogger get(java.lang.Class<?> cls)
Logger
using the name of the specified classcls
- the class whose name is used as logger name that will be printed
aside each log stringRMILogger
void log(java.lang.String format, java.lang.Object... objects)
format
- the format of the log stringobjects
- the objects that are printed in the formatted stringvoid logIf(boolean condition, java.lang.String format, java.lang.Object... objects)
log(String, Object...)
logs a string. The string is logged if and
only if the specified condition is true.condition
- set to true to log the string or set to false to have no
effectsformat
- the format of the log stringobjects
- the objects that are printed in the formatted string