Package com.ultikits.ultitools.manager
Class LogStreamManager
java.lang.Object
com.ultikits.ultitools.manager.LogStreamManager
- All Implemented Interfaces:
org.bukkit.event.Listener
Log stream manager.
Responsible for monitoring server logs in real time and transmitting them to UltiPanel via WebSocket.
- Version:
- 2.0.0
- Author:
- UltiKits
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidDetaches every one of this framework'sSystemLogHandlerinstances from the JVM root logger.static LogStreamManagervoidshutdown()Shuts down the log stream manager.
-
Field Details
-
instance
-
-
Constructor Details
-
LogStreamManager
private LogStreamManager()
-
-
Method Details
-
getInstance
-
shutdown
public void shutdown()Shuts down the log stream manager. -
detachAllSystemLogHandlers
private void detachAllSystemLogHandlers()Detaches every one of this framework'sSystemLogHandlerinstances from the JVM root logger.Deliberately scans by type and removes every instance, rather than only removing
this.systemLogHandler: before this method existed, every successful reconnect attached one more to the root logger, the field could only ever hold onto the last one, and the previously-leaked ones had no reference pointing at them any more and so could never be detached. Only a type-based scan can clean up the whole historical backlog at once, and that is also the only formulation under which the acceptance criterion "handler count is always 1" can hold. See issue #181.
-