
Public Member Functions | |
| void | debug (String mesg) |
| void | debug (String mesg, Throwable ex) |
| void | error (String mesg) |
| void | error (String mesg, Throwable ex) |
| void | fatal (String mesg) |
| void | fatal (String mesg, Throwable ex) |
| int | getLevel () |
| void | info (String mesg) |
| void | info (String mesg, Throwable ex) |
| boolean | isDebugEnabled () |
| boolean | isInfoEnabled () |
| void | setLevel (int level) |
| void | warn (String mesg) |
| void | warn (String mesg, Throwable ex) |
Static Public Member Functions | |
| static synchronized Logger | getLogger (String name) |
| static synchronized Logger | getLogger (String name, int level) |
Static Public Attributes | |
| static final int | LEVEL_DEBUG = 0 |
| static final int | LEVEL_ERROR = 3 |
| static final int | LEVEL_FATAL = 4 |
| static final int | LEVEL_INFO = 1 |
| static final int | LEVEL_WARN = 2 |
Protected Member Functions | |
| Logger (String name) | |
| Logger (String name, int level) | |
Private Member Functions | |
| void | log (String mesg, Throwable ex) |
Private Attributes | |
| boolean | initialized = false |
| int | level |
| String | name |
Static Private Attributes | |
| static Map< String, Logger > | loggers |
This can easily be swapped out for any other logging package in the main code. For now, this is just a quick and dirty logger which will allow you to specify log levels, but only wraps system.out.println.
| void debug | ( | String | mesg | ) |
| void debug | ( | String | mesg, | |
| Throwable | ex | |||
| ) |
logs a debug mesg
| mesg | ||
| ex |
| void error | ( | String | mesg | ) |
| void error | ( | String | mesg, | |
| Throwable | ex | |||
| ) |
logs error mesg
| mesg | ||
| ex |
| void fatal | ( | String | mesg | ) |
| void fatal | ( | String | mesg, | |
| Throwable | ex | |||
| ) |
logs fatal mesg
| mesg | ||
| ex |
| int getLevel | ( | ) |
| void info | ( | String | mesg | ) |
| void info | ( | String | mesg, | |
| Throwable | ex | |||
| ) |
logs info mesg
| mesg | ||
| ex |
| boolean isDebugEnabled | ( | ) |
| boolean isInfoEnabled | ( | ) |
| void log | ( | String | mesg, | |
| Throwable | ex | |||
| ) | [private] |
logs mesg to std out and prints stack trace if exception passed in
| mesg | ||
| ex |
| void setLevel | ( | int | level | ) |
| void warn | ( | String | mesg | ) |
| void warn | ( | String | mesg, | |
| Throwable | ex | |||
| ) |
logs warn mesg
| mesg | ||
| ex |
boolean initialized = false [private] |
int level [private] |
final int LEVEL_DEBUG = 0 [static] |
final int LEVEL_ERROR = 3 [static] |
final int LEVEL_FATAL = 4 [static] |
final int LEVEL_INFO = 1 [static] |
final int LEVEL_WARN = 2 [static] |
1.5.8