Package arc.util
Class Logger
java.lang.Object
arc.util.Logger
Logger with topics.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Logger.LoggerHandlerstatic Logger.TopicFormatterprotected static final Object[]protected Stringnullto useLog.formatter.Custom logging level.Only used once to format topics, the result is then cached.protected String[] -
Constructor Summary
ConstructorsConstructorDescriptionLogger()Uses the capitalized class name (without package) as a topic.Uses the capitalized class name (without package) for the first class, and the fully qualified class name for others. -
Method Summary
Modifier and TypeMethodDescriptionvoidIgnores if topic is empty and trim spaces.voidvoidvoidvoidvoidvoidvoidvoidvoidString[]Commonly the first topic is a main and second is a thing related.voidvoidvoidvoidln()Log an empty info line.voidlog(Log.LogLevel level, String text) voidlog(Log.LogLevel level, String text, Object... args) voidlog(Log.LogLevel level, String text, Throwable th, Object... args) voidIgnores empty topics.voidvoidvoid
-
Field Details
-
empty
-
defaultLogger
-
defaultTopicFormatter
-
level
Custom logging level.nullto useLog.level. -
topics
-
formattedTopics
-
logger
-
topicFormatter
Only used once to format topics, the result is then cached. -
formatter
nullto useLog.formatter.
-
-
Constructor Details
-
Logger
public Logger() -
Logger
Uses the capitalized class name (without package) as a topic. -
Logger
Uses the capitalized class name (without package) for the first class, and the fully qualified class name for others. -
Logger
-
Logger
-
-
Method Details
-
getTopics
Commonly the first topic is a main and second is a thing related.nullif no topics.- Returns:
- a copy of topics.
-
addTopic
Ignores if topic is empty and trim spaces. -
setTopics
Ignores empty topics. -
log
-
log
-
log
-
debug
-
debug
-
debug
-
info
-
info
-
info
-
warn
-
warn
-
warn
-
err
-
err
-
err
-
err
-
err
-
err
-
ln
public void ln()Log an empty info line.
-