public class DevLogger extends Object implements Loggable<String>
| Modifier and Type | Field and Description |
|---|---|
static String |
ENV_LOG_FILELINE |
static String |
ENV_LOG_LEVEL |
static String |
ENV_LOG_OUTPUT |
static String |
ENV_LOG_TIMESTAMP |
static byte |
LV_ALL |
static byte |
LV_DEBUG |
static byte |
LV_ERROR |
static byte |
LV_FATAL |
static byte |
LV_INFO |
static byte |
LV_OFF |
static byte |
LV_TRACE |
static byte |
LV_WARN |
| Constructor and Description |
|---|
DevLogger(Class<?> c) |
DevLogger(Class<?> c,
String identifier)
Logger name to have optional identifier such as filename.
|
DevLogger(String name)
When DevLogger is created, it will get Property and ENV variables for activating the logger.
|
| Modifier and Type | Method and Description |
|---|---|
void |
debug(FnR<String> msg) |
void |
error(FnR<String> msg) |
void |
error(FnR<String> msg,
int skip) |
void |
fatal(FnR<String> msg) |
void |
fatal(FnR<String> msg,
int skip) |
void |
info(FnR<String> msg) |
DevLogger |
setFormat(boolean timestamp,
boolean fileline)
Set output format to include timestamp and fileline.
|
DevLogger |
setLevel(byte level) |
DevLogger |
setLevel(char level) |
DevLogger |
setLevel(int level) |
DevLogger |
setLevel(String level)
Set level, either take full string, first character, OR the static variables starting with "LV_".
|
DevLogger |
setOutput(FnTT<Byte,String> writer)
Set output writer function
|
DevLogger |
testing()
Enables all options.
|
String |
toString() |
void |
trace(FnR<String> msg) |
void |
warn(FnR<String> msg) |
void |
warn(FnR<String> msg,
int skip) |
public static final byte LV_ALL
public static final byte LV_TRACE
public static final byte LV_DEBUG
public static final byte LV_INFO
public static final byte LV_WARN
public static final byte LV_ERROR
public static final byte LV_FATAL
public static final byte LV_OFF
public static final String ENV_LOG_OUTPUT
public static final String ENV_LOG_LEVEL
public static final String ENV_LOG_TIMESTAMP
public static final String ENV_LOG_FILELINE
public DevLogger(String name)
name - of the class the logger belongs to.public DevLogger(Class<?> c)
public DevLogger setOutput(FnTT<Byte,String> writer)
writer - consumer function takes a string.public DevLogger setFormat(boolean timestamp, boolean fileline)
timestamp - from the starting of (DevLogger) code. (true/false)fileline - filename and line number. (true/false)public DevLogger setLevel(String level)
level - String, char, integer, or bytepublic DevLogger setLevel(byte level)
public DevLogger setLevel(int level)
public DevLogger setLevel(char level)
public DevLogger testing()
Copyright © 2023. All rights reserved.