Package ch.njol.skript.log
Class LogHandler
java.lang.Object
ch.njol.skript.log.LogHandler
- All Implemented Interfaces:
OpenCloseable
,Closeable
,AutoCloseable
- Direct Known Subclasses:
BlockingLogHandler
,CountingLogHandler
,ErrorDescLogHandler
,FilteringLogHandler
,ParseLogHandler
,RedirectingLogHandler
,RetainingLogHandler
,TimingLogHandler
A log handler is used to handle Skripts logging.
A log handler is local to the thread it is started on.
Log handlers should always be stopped when they are no longer needed.
Log handlers should always be stopped when they are no longer needed.
- See Also:
SkriptLogger.startLogHandler(LogHandler)
-
Nested Class Summary
-
Field Summary
Fields inherited from interface ch.njol.util.OpenCloseable
EMPTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
abstract LogHandler.LogResult
protected void
onStop()
Called just after the handler is removed from the active handlers stack.void
open()
start()
A convenience method forSkriptLogger.startLogHandler(LogHandler)
.void
stop()
-
Constructor Details
-
LogHandler
public LogHandler()
-
-
Method Details
-
log
- Parameters:
entry
- entry to log- Returns:
- Whether to print the specified entry or not.
-
onStop
protected void onStop()Called just after the handler is removed from the active handlers stack. -
stop
public final void stop() -
isStopped
public boolean isStopped() -
start
A convenience method forSkriptLogger.startLogHandler(LogHandler)
.
Implementations should override this to set the return type to the implementing class. -
open
public void open()- Specified by:
open
in interfaceOpenCloseable
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceOpenCloseable
-