Package ch.njol.skript.log
Class SkriptLogger
java.lang.Object
ch.njol.skript.log.SkriptLogger
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
debug()
static @Nullable Node
getNode()
static void
static boolean
Checks whether messages should be logged for the given verbosity.static void
Logging should be done like this:static void
logAll(Collection<LogEntry> entries)
static void
logTracked(Level level, String message, ErrorQuality quality)
static void
static void
static <T extends LogHandler>
TstartLogHandler(T h)
Starts a log handler.static ParseLogHandler
Shorthand forstartLogHandler
(newParseLogHandler
());static RetainingLogHandler
Shorthand 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.
-