[DEV] add local log interface
This commit is contained in:
parent
658ffc54d9
commit
348bf2ed80
60
src/io/scenarium/logger/internal/Log.java
Normal file
60
src/io/scenarium/logger/internal/Log.java
Normal file
@ -0,0 +1,60 @@
|
||||
package io.scenarium.logger.internal;
|
||||
|
||||
import io.scenarium.logger.LogLevel;
|
||||
import io.scenarium.logger.Logger;
|
||||
|
||||
public class Log {
|
||||
private static final String LIB_NAME = "logger";
|
||||
private static final String LIB_NAME_DRAW = Logger.getDrawableName(LIB_NAME);
|
||||
private static final boolean PRINT_CRITICAL = Logger.getNeedPrint(LIB_NAME, LogLevel.CRITICAL);
|
||||
private static final boolean PRINT_ERROR = Logger.getNeedPrint(LIB_NAME, LogLevel.ERROR);
|
||||
private static final boolean PRINT_WARNING = Logger.getNeedPrint(LIB_NAME, LogLevel.WARNING);
|
||||
private static final boolean PRINT_INFO = Logger.getNeedPrint(LIB_NAME, LogLevel.INFO);
|
||||
private static final boolean PRINT_DEBUG = Logger.getNeedPrint(LIB_NAME, LogLevel.DEBUG);
|
||||
private static final boolean PRINT_VERBOSE = Logger.getNeedPrint(LIB_NAME, LogLevel.VERBOSE);
|
||||
private static final boolean PRINT_TODO = Logger.getNeedPrint(LIB_NAME, LogLevel.TODO);
|
||||
private static final boolean PRINT_PRINT = Logger.getNeedPrint(LIB_NAME, LogLevel.PRINT);
|
||||
|
||||
private Log() {}
|
||||
|
||||
public static void print(String data) {
|
||||
if (PRINT_PRINT)
|
||||
Logger.print(LIB_NAME_DRAW, data);
|
||||
}
|
||||
|
||||
public static void todo(String data) {
|
||||
if (PRINT_TODO)
|
||||
Logger.todo(LIB_NAME_DRAW, data);
|
||||
}
|
||||
|
||||
public static void critical(String data) {
|
||||
if (PRINT_CRITICAL)
|
||||
Logger.critical(LIB_NAME_DRAW, data);
|
||||
}
|
||||
|
||||
public static void error(String data) {
|
||||
if (PRINT_ERROR)
|
||||
Logger.error(LIB_NAME_DRAW, data);
|
||||
}
|
||||
|
||||
public static void warning(String data) {
|
||||
if (PRINT_WARNING)
|
||||
Logger.warning(LIB_NAME_DRAW, data);
|
||||
}
|
||||
|
||||
public static void info(String data) {
|
||||
if (PRINT_INFO)
|
||||
Logger.info(LIB_NAME_DRAW, data);
|
||||
}
|
||||
|
||||
public static void debug(String data) {
|
||||
if (PRINT_DEBUG)
|
||||
Logger.debug(LIB_NAME_DRAW, data);
|
||||
}
|
||||
|
||||
public static void verbose(String data) {
|
||||
if (PRINT_VERBOSE)
|
||||
Logger.verbose(LIB_NAME_DRAW, data);
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user