Class AbstractLogHandler
- java.lang.Object
-
- de.dytanic.cloudnet.common.logging.AbstractLogHandler
-
- All Implemented Interfaces:
ILogHandler,java.lang.AutoCloseable
- Direct Known Subclasses:
DefaultFileLogHandler
public abstract class AbstractLogHandler extends java.lang.Object implements ILogHandler
This is a basic abstract implementation of the ILogHandler class. It should help, to create a simple
-
-
Field Summary
Fields Modifier and Type Field Description protected IFormatterformatterA formatter with a default initialization value with the DefaultLogFormatter class.
-
Constructor Summary
Constructors Constructor Description AbstractLogHandler()AbstractLogHandler(@NotNull IFormatter formatter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()@NotNull IFormattergetFormatter()@NotNull AbstractLogHandlersetFormatter(@NotNull IFormatter formatter)Set the new formatter-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.dytanic.cloudnet.common.logging.ILogHandler
handle
-
-
-
-
Field Detail
-
formatter
protected IFormatter formatter
A formatter with a default initialization value with the DefaultLogFormatter class.- See Also:
DefaultLogFormatter
-
-
Constructor Detail
-
AbstractLogHandler
public AbstractLogHandler()
-
AbstractLogHandler
public AbstractLogHandler(@NotNull @NotNull IFormatter formatter)
-
-
Method Detail
-
getFormatter
@NotNull public @NotNull IFormatter getFormatter()
-
setFormatter
@NotNull public @NotNull AbstractLogHandler setFormatter(@NotNull @NotNull IFormatter formatter)
Set the new formatter- Returns:
- the current instance of the AbstractLogHandler class
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
-