|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.alarexgroup.m2mplf.logging.Logger
public class Logger
This class provides logging in several levels and on different channels.
Example:
Logger.logInfo("Application started!");
Anywhere in application is possible to use just Logger.log...
Logging is in every application automaticaly initialized and saving processes into m2m_timestamp.log file
| Field Summary | |
|---|---|
static int |
LEVEL_DEBUG
All records ERROR, INFO, DEBUG |
static int |
LEVEL_ERROR
Only ERROR records |
static int |
LEVEL_INFO
Only ERROR or INFO records |
static java.lang.String[] |
LEVEL_LABELS
Standard level setting |
static int |
LEVEL_NONE
No records |
static int |
LOG_OUTPUT_BUFFER
Logging into internal buffer - debugger can read from logBuffer variable |
static int |
LOG_OUTPUT_FILE
Logging into file, standard a:/m2m_timestamp.log |
static java.lang.String[] |
LOG_OUTPUT_LABELS
Standard output setting |
static int |
LOG_OUTPUT_NONE
Record will be lost - no logging |
static int |
LOG_OUTPUT_SERIAL
Logging on ASCO, blocking, baudrate 115200 |
static int |
LOG_OUTPUT_STD_OUT
Logging on STD_OUTPUT |
| Constructor Summary | |
|---|---|
Logger()
|
|
| Method Summary | |
|---|---|
static void |
clearLogBuffer()
Erases logBuffer |
static java.lang.String |
getLogBuffer()
Method returns log buffer content |
static void |
logDebug(java.lang.String message)
Record into log on level DEBUG |
static void |
logError(java.lang.String message)
Record into log on level ERROR |
static void |
logError(java.lang.Throwable throwable)
Rocord into log on level ERROR |
static void |
logFileClose()
Closes the logfile |
static void |
logInfo(java.lang.String message)
Rocord into log on level INFO |
static void |
setLogCOM(java.lang.String comSerial)
Sets serial port for logging |
static void |
setLogFilename(java.lang.String filename)
Log. file's name setting |
static void |
setLoggingLevel(int level)
This method configures which levels of messages will be passed to outputs |
static void |
setLoggingOutput(int output)
This method configures output's logging channels. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEVEL_NONE
public static final int LEVEL_ERROR
public static final int LEVEL_INFO
public static final int LEVEL_DEBUG
public static final java.lang.String[] LEVEL_LABELS
public static int LOG_OUTPUT_NONE
public static int LOG_OUTPUT_STD_OUT
public static int LOG_OUTPUT_FILE
public static int LOG_OUTPUT_SERIAL
public static int LOG_OUTPUT_BUFFER
getLogBuffer()public static final java.lang.String[] LOG_OUTPUT_LABELS
| Constructor Detail |
|---|
public Logger()
| Method Detail |
|---|
public static void setLoggingLevel(int level)
level - - DEBUG,ERROR,INFpublic static void setLoggingOutput(int output)
output - for example: Logger.LOG_OUTPUT_FILE | Logger.LOG_OUTPUT_SERIALpublic static void setLogFilename(java.lang.String filename)
filename - file namepublic static void setLogCOM(java.lang.String comSerial)
comSerial - serial portpublic static void logDebug(java.lang.String message)
message - recording textpublic static void logError(java.lang.String message)
message - textpublic static void logError(java.lang.Throwable throwable)
throwable - exception to be loggedpublic static void logInfo(java.lang.String message)
message - public static java.lang.String getLogBuffer()
public static void clearLogBuffer()
public static void logFileClose()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||