Class Logger
java.lang.Object
com.codename1.backend.log.Logger
An application logger in the shape slf4j's is, writing through Logging.
private static final Logger LOG = Logger.getLogger(PushService.class);
LOG.info("sent {} notifications to {}", count, appId);
LOG.warn("APNs rejected token", ex);
if (LOG.isDebugEnabled()) {
LOG.debug("payload {}", render(payload));
}
Each {} in the message is replaced by the next argument; \{} is a
literal {}. A throwable left over after the placeholders are filled -- the
last argument, as slf4j takes it -- is written with its stack trace.
A line reads 2026-11-01T09:30:00.123Z INFO [thread] com.example.Push - message,
followed by the thread's MDC context when it has one. The level of each
logger comes from the logging.level.* settings; see Logging.
No reflection, no configuration file and no static binding: a logger is a name and a cached level.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidstatic LoggerThe logger named aftertype, its fully qualified class name.static LoggerThe logger withname.getName()The name lines are written under.voidbooleanbooleanWhether a line atlevelwould be written.booleanbooleanbooleanbooleanvoidWritesmessageatlevel, its{}placeholders filled fromargs.voidvoid
-
Method Details
-
getLogger
-
getLogger
-
getName
The name lines are written under. -
isEnabled
Whether a line atlevelwould be written. -
isTraceEnabled
public boolean isTraceEnabled() -
isDebugEnabled
public boolean isDebugEnabled() -
isInfoEnabled
public boolean isInfoEnabled() -
isWarnEnabled
public boolean isWarnEnabled() -
isErrorEnabled
public boolean isErrorEnabled() -
trace
-
debug
-
info
-
warn
-
error
-
log
-