public class NanoLogger extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HOME_DIR
Defines the current users home directory
|
| Constructor and Description |
|---|
NanoLogger(String filepath) |
| Modifier and Type | Method and Description |
|---|---|
void |
debug(String message)
Log a 'debug' message
|
void |
error(String message)
Log an 'error' message
|
void |
error(Throwable error)
Logs the stack trace of a
Throwable |
void |
fatal(String message)
Log a 'fatal' message
|
String |
getCurrentDate()
Get the current date and time
|
String |
getLastLog()
Gets the most recent message that was logged
|
String |
getLogPath()
gets the absolute path of the log file
|
void |
info(String message)
Log an 'info' message
|
void |
log(String message,
LogType logType)
A general function to log to the log file
|
void |
success(String message)
Log a 'success' message
|
public static final String HOME_DIR
public NanoLogger(String filepath)
public String getCurrentDate()
public String getLogPath()
public String getLastLog()
public void log(String message, LogType logType) throws IOException
message - the message to loglogType - the type of message the message isIOException - if there was an error writing to the log filepublic void info(String message)
message - the message to logpublic void success(String message)
message - the message to logpublic void error(String message)
message - the message the logpublic void error(Throwable error)
Throwableerror - the throwable to logpublic void debug(String message)
message - the message to writepublic void fatal(String message)
message - the message to logCopyright © 2017. All rights reserved.