public class GlobalLogger extends MadaraJNI
| Constructor and Description |
|---|
GlobalLogger()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addFile(java.lang.String filename)
Adds a file to logging outputs
|
static void |
addSyslog()
Adds the system logger to logging outputs
|
static void |
addTerm()
Adds the terminal to logging outputs (turned on by default)
|
static void |
clear()
Clears all logging targets
|
static int |
getLevel()
Gets the logging level, e.g., where 0 is EMERGENCY and 6 is DETAILED
|
static java.lang.String |
getTag()
Gets the tag used in system logging
|
static void |
log(int level,
java.lang.String message)
Logs a message at the specified level
|
static void |
setLevel(int level)
Sets the logging level
|
static void |
setTag(java.lang.String tag)
Sets the tag used for system logging
|
static void |
setTimestampFormat(java.lang.String format)
Sets timestamp format.
|
static Logger |
toLogger()
Gets the logging level, e.g., where 0 is EMERGENCY and 6 is DETAILED
|
public static java.lang.String getTag()
public static int getLevel()
public static Logger toLogger()
public static void setTag(java.lang.String tag)
tag - the tag to be used for system loggingpublic static void setLevel(int level)
level - level of message severity to print to log targetspublic static void clear()
public static void addTerm()
public static void addSyslog()
public static void addFile(java.lang.String filename)
filename - the name of a file to add to logging targetspublic static void log(int level,
java.lang.String message)
level - the logging severity level (0 is high)message - the message to send to all logging targetspublic static void setTimestampFormat(java.lang.String format)
format - the format of the timestamp. See C++
strftime definition for common usage.