Class HytaleLoggerBackend
java.lang.Object
com.google.common.flogger.backend.LoggerBackend
com.hypixel.hytale.logger.backend.HytaleLoggerBackend
public class HytaleLoggerBackend
extends com.google.common.flogger.backend.LoggerBackend
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<String, HytaleLoggerBackend> private Levelprivate final Stringprivate static final intprivate BiConsumer<Level, Level> private final HytaleLoggerBackendprivate booleanstatic final PrintStreamstatic final PrintStreamprivate static final HytaleLoggerBackendprivate HytaleSentryHandler -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHytaleLoggerBackend(String name) protectedHytaleLoggerBackend(String name, HytaleLoggerBackend parent) -
Method Summary
Modifier and TypeMethodDescriptiongetLevel()static HytaleLoggerBackendstatic HytaleLoggerBackendstatic HytaleLoggerBackendgetLogger(String name, BiConsumer<Level, Level> onLevelChange) getSubLogger(String name) voidhandleError(RuntimeException error, com.google.common.flogger.backend.LogData badData) static booleanbooleanisLoggable(Level lvl) static voidloadLevels(List<Map.Entry<String, Level>> list) voidvoidlog(com.google.common.flogger.backend.LogData data) voidvoidstatic voidstatic voidstatic voidsetIndent(int indent) voidvoidsetOnLevelChange(BiConsumer<Level, Level> onLevelChange) voidsetPropagatesSentryToParent(boolean propagate) voidsetSentryClient(io.sentry.IScopes scope) static voidsubscribe(CopyOnWriteArrayList<LogRecord> subscriber) static voidunsubscribe(CopyOnWriteArrayList<LogRecord> subscriber)
-
Field Details
-
LOG_LEVEL_LOADER
-
REAL_SOUT
-
REAL_SERR
-
CACHE
-
ROOT_LOGGER
-
OFF_VALUE
private static final int OFF_VALUE -
name
-
parent
-
level
-
onLevelChange
-
sentryHandler
-
propagateSentryToParent
private boolean propagateSentryToParent -
subscribers
-
-
Constructor Details
-
HytaleLoggerBackend
-
HytaleLoggerBackend
-
-
Method Details
-
getLoggerName
- Specified by:
getLoggerNamein classcom.google.common.flogger.backend.LoggerBackend
-
getLevel
-
isLoggable
- Specified by:
isLoggablein classcom.google.common.flogger.backend.LoggerBackend
-
log
public void log(@Nonnull com.google.common.flogger.backend.LogData data) - Specified by:
login classcom.google.common.flogger.backend.LoggerBackend
-
handleError
public void handleError(@Nonnull RuntimeException error, @Nonnull com.google.common.flogger.backend.LogData badData) - Specified by:
handleErrorin classcom.google.common.flogger.backend.LoggerBackend
-
log
-
log
-
subscribe
-
unsubscribe
-
getSubLogger
-
setSentryClient
public void setSentryClient(@Nullable io.sentry.IScopes scope) -
setPropagatesSentryToParent
public void setPropagatesSentryToParent(boolean propagate) -
setOnLevelChange
-
setLevel
-
loadLogLevel
public void loadLogLevel() -
loadLevels
-
reloadLogLevels
public static void reloadLogLevels() -
getLogger
-
getLogger
-
getLogger
@Nonnull public static HytaleLoggerBackend getLogger(String name, BiConsumer<Level, Level> onLevelChange) -
setIndent
public static void setIndent(int indent) -
isJunitTest
public static boolean isJunitTest() -
rawLog
-