Package ch.njol.skript.log
Class SkriptLogger
java.lang.Object
ch.njol.skript.log.SkriptLogger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandebug()static @Nullable NodegetNode()static voidstatic booleanChecks whether messages should be logged for the given verbosity.static voidLogging should be done like this:static voidlogAll(Collection<LogEntry> entries)static voidlogTracked(Level level, String message, ErrorQuality quality)static voidstatic voidstatic <T extends LogHandler>
TstartLogHandler(T h)Starts a log handler.static ParseLogHandlerShorthand forstartLogHandler(newParseLogHandler());static RetainingLogHandlerShorthand forstartLogHandler(newRetainingLogHandler());
-
Field Details
-
SEVERE
-
DEBUG
-
LOGGER
-
-
Constructor Details
-
SkriptLogger
public SkriptLogger()
-
-
Method Details
-
startRetainingLog
Shorthand forstartLogHandler(newRetainingLogHandler());- Returns:
- A newly created RetainingLogHandler
-
startParseLogHandler
Shorthand forstartLogHandler(newParseLogHandler());- Returns:
- A newly created ParseLogHandler
-
startLogHandler
Starts a log handler.This should be used like this:
try (LogHandler handler = SkriptLogger.startLogHandler(new ...LogHandler())) { doSomethingThatLogsMessages(); // do something with the logged messages }- Returns:
- The passed LogHandler
- See Also:
startParseLogHandler(),startRetainingLog(),BlockingLogHandler,CountingLogHandler,ErrorDescLogHandler,FilteringLogHandler,RedirectingLogHandler
-
setVerbosity
-
debug
public static boolean debug() -
setNode
-
getNode
-
log
Logging should be done like this:if (Skript.logNormal()) Skript.info("this information is displayed on verbosity normal or higher");- Parameters:
level-message-- See Also:
Skript.info(String),Skript.warning(String),Skript.error(String),Skript.logNormal(),Skript.logHigh(),Skript.logVeryHigh(),Skript.debug()
-
log
-
logAll
-
logTracked
-
log
Checks whether messages should be logged for the given verbosity.- Parameters:
minVerb- minimal verbosity- Returns:
- Whether messages should be logged for the given verbosity.
-