Package com.petarmc.lib.log
Class Log
java.lang.Object
com.petarmc.lib.log.Log
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PLoggerReturns a logger instance for the specified class with a prefix.static PLoggerReturns a logger instance with the specified name and prefix.static voidInjects a custom logger to be returned by allget(java.lang.Class<?>, java.lang.String)calls.
-
Field Details
-
injected
-
-
Constructor Details
-
Log
public Log()
-
-
Method Details
-
inject
Injects a custom logger to be returned by allget(java.lang.Class<?>, java.lang.String)calls.- Parameters:
logger- the logger to inject
-
get
Returns a logger instance for the specified class with a prefix.- Parameters:
clazz- the class for which the logger is requestedprefix- the prefix to apply to this logger's messages- Returns:
- a logger instance
-
get
Returns a logger instance with the specified name and prefix.- Parameters:
name- the name of the loggerprefix- the prefix to apply to this logger's messages- Returns:
- a logger instance
-