Package net.eternalclient.api.utilities
Class Log
- java.lang.Object
-
- net.eternalclient.api.utilities.Log
-
public class Log extends java.lang.Object
A class that provides logging functionality with different log levels and methods to log debug, info, warning, error, event debug, callback debug, and exception messages.
-
-
Constructor Summary
Constructors Constructor Description Log()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
callbackDebug(java.lang.String message)
Calls the callbackDebug method of the log class, passing a debug message as parameter.static void
callbackDebug(java.lang.String format, java.lang.Object... args)
Logs a debug message with the specified format and arguments to the callback logger.static void
clientDebug(java.lang.String message)
if debug mode is active it outputs a debug message to the log for debugging purposes.static void
clientDebug(java.lang.String format, java.lang.Object... args)
Logs a debug messages if debug mode is active with the given format and arguments.static void
debug(java.lang.String message)
Logs a debug message.static void
debug(java.lang.String format, java.lang.Object... args)
Prints a debug message using the specified format and arguments.static void
disableLogger(java.lang.Class<?> clazz)
static void
enableLogger(java.lang.Class<?> clazz)
static void
error(java.lang.String message)
Logs an error message.static void
error(java.lang.String format, java.lang.Object... args)
Logs an error message with the specified format and arguments.static void
eventDebug(java.lang.String message)
Outputs a debug message to the log for debugging purposes.static void
eventDebug(java.lang.String format, java.lang.Object... args)
Logs a debug message for an event with the given format and arguments.static void
exception(java.lang.Throwable t)
Logs the given throwable exception.static void
exceptionDebug(java.lang.Throwable t)
Logs the given throwable exception.static ILogger
getLogger(java.lang.Class<?> clazz)
Retrieves the logger for the specified class.static void
info(java.lang.String message)
Logs an info level message.static void
info(java.lang.String format, java.lang.Object... args)
Logs an info message with the specified format and arguments.static void
warn(java.lang.String message)
Logs a warning message.static void
warn(java.lang.String format, java.lang.Object... args)
Logs a warning message with the given format and arguments.
-
-
-
Method Detail
-
getLogger
public static ILogger getLogger(java.lang.Class<?> clazz)
Retrieves the logger for the specified class.- Parameters:
clazz
- the class for which the logger is to be retrieved- Returns:
- the logger associated with the specified class
-
disableLogger
public static void disableLogger(java.lang.Class<?> clazz)
-
enableLogger
public static void enableLogger(java.lang.Class<?> clazz)
-
debug
public static void debug(java.lang.String message)
Logs a debug message.- Parameters:
message
- the message to be logged
-
debug
public static void debug(java.lang.String format, java.lang.Object... args)
Prints a debug message using the specified format and arguments.- Parameters:
format
- the format string for the debug messageargs
- the arguments to be formatted and included in the debug message
-
info
public static void info(java.lang.String message)
Logs an info level message.- Parameters:
message
- the message to be logged
-
info
public static void info(java.lang.String format, java.lang.Object... args)
Logs an info message with the specified format and arguments.- Parameters:
format
- the format string for the messageargs
- the arguments to be formatted and included in the message
-
warn
public static void warn(java.lang.String message)
Logs a warning message.- Parameters:
message
- the warning message to be logged
-
warn
public static void warn(java.lang.String format, java.lang.Object... args)
Logs a warning message with the given format and arguments.- Parameters:
format
- the format of the warning messageargs
- the arguments to be formatted in the message
-
error
public static void error(java.lang.String message)
Logs an error message.- Parameters:
message
- the error message to be logged
-
error
public static void error(java.lang.String format, java.lang.Object... args)
Logs an error message with the specified format and arguments.- Parameters:
format
- the error message format stringargs
- the arguments to be formatted
-
eventDebug
public static void eventDebug(java.lang.String message)
Outputs a debug message to the log for debugging purposes.- Parameters:
message
- the message to be logged
-
eventDebug
public static void eventDebug(java.lang.String format, java.lang.Object... args)
Logs a debug message for an event with the given format and arguments.- Parameters:
format
- the format of the debug messageargs
- the arguments to be formatted in the debug message
-
clientDebug
public static void clientDebug(java.lang.String message)
if debug mode is active it outputs a debug message to the log for debugging purposes.- Parameters:
message
- the message to be logged
-
clientDebug
public static void clientDebug(java.lang.String format, java.lang.Object... args)
Logs a debug messages if debug mode is active with the given format and arguments.- Parameters:
format
- the format of the debug messageargs
- the arguments to be formatted in the debug message
-
callbackDebug
public static void callbackDebug(java.lang.String message)
Calls the callbackDebug method of the log class, passing a debug message as parameter.- Parameters:
message
- the debug message to be logged
-
callbackDebug
public static void callbackDebug(java.lang.String format, java.lang.Object... args)
Logs a debug message with the specified format and arguments to the callback logger.- Parameters:
format
- the format string for the debug messageargs
- the arguments to be formatted and included in the debug message
-
exception
public static void exception(java.lang.Throwable t)
Logs the given throwable exception.- Parameters:
t
- the throwable exception to be logged
-
exceptionDebug
public static void exceptionDebug(java.lang.Throwable t)
Logs the given throwable exception.- Parameters:
t
- the throwable exception to be logged
-
-