public class DebugLogger extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEBUGLEVEL_DEBUG |
static int |
DEBUGLEVEL_ERROR |
static int |
DEBUGLEVEL_INFO |
static int |
DEBUGLEVEL_OFF |
Modifier and Type | Method and Description |
---|---|
static void |
debug(String info)
Write info.
|
static String |
debugLevelToString()
This method returns current debug level as a string
|
static String |
debugLevelToString(int debugLevel)
This method returns the debug level defined by the parameter as a string
|
static void |
error(String info)
Write error message.
|
static int |
getDebugLevel()
Returns the debug level
|
static void |
info(String info)
Write info.
|
static void |
setDebugLevel(int newDebugLevel)
Set debugging level
|
static void |
setDebugLevel(String level)
Set the debug level.
|
static void |
setErrorPrintStream(PrintStream newErrorStream)
Replace current error PrintStream with indicated one
|
static void |
setInfoPrintStream(PrintStream newInfoStream)
Replace current info PrintStream with indicated one
|
public static final int DEBUGLEVEL_DEBUG
public static final int DEBUGLEVEL_INFO
public static final int DEBUGLEVEL_ERROR
public static final int DEBUGLEVEL_OFF
public static void setErrorPrintStream(PrintStream newErrorStream)
newErrorStream
- New PrintStream for error printingpublic static void setInfoPrintStream(PrintStream newInfoStream)
newInfoStream
- New PrintStream for info printingpublic static void setDebugLevel(int newDebugLevel)
newDebugLevel
- The new debug levelpublic static void setDebugLevel(String level)
level
- The level as string valuepublic static int getDebugLevel()
public static void debug(String info)
info
- The infopublic static void info(String info)
info
- The infopublic static void error(String info)
info
- The messagepublic static String debugLevelToString(int debugLevel)
debugLevel
- The debug level to convertpublic static String debugLevelToString()
Copyright © 2019. All rights reserved.