System.Logger
that is used for internal
debugging purposes in the java.net.http
module.
Though not enforced, this interface is designed for emitting debug messages with Level.DEBUG.
It defines log
methods that default to Level.DEBUG
,
so that they can be called in statements like:
debug.log("some %s with %d %s", message(), one(), params());
Implementation Specification
This interface is implemented by loggers returned by
Utils#getDebugLogger(Supplier)
,
Utils#getWebSocketLogger(Supplier)
and
Utils#getHpackLogger(Supplier)
.
It is not designed to be implemented by any other
loggers. Do not use outside of this module.
Modifier and Type | Method and Description |
---|---|
public default void | log(String
the string message (or a key in the message catalog, if
this logger is a msg)localized logger );
can be null .Logs a message. |
public default void | |
public default void | |
public default void | log(String
the string message (or a key in the message catalog, if
this logger is a msg, Throwable localized logger );
can be null .a thrown)Throwable associated with the log message;
can be null .Logs a message associated with a given throwable. |
public default void | |
public default void | log(String
the string message format in
format, Object... String#format(String, Object. or java. format, (or a key in the message
catalog, if this logger is a localized logger );
can be null .an optional list of parameters to the message (may be
none). params)Logs a message with an optional list of parameters. |
public default boolean |
log | back to summary |
---|---|
public default void log(String msg) Logs a message. Implementation Specification The default implementation for this method calls
|
log | back to summary |
---|---|
public default void log(Supplier<String> msgSupplier) Logs a lazily supplied message. Implementation Specification The default implementation for this method calls
|
log | back to summary |
---|---|
public default void log(Object obj) Logs a message produced from the given object. Implementation Specification The default implementation for this method calls
|
log | back to summary |
---|---|
public default void log(String msg, Throwable thrown) Logs a message associated with a given throwable. Implementation Specification The default implementation for this method calls
|
log | back to summary |
---|---|
public default void log(Supplier<String> msgSupplier, Throwable thrown) Logs a lazily supplied message associated with a given throwable. Implementation Specification The default implementation for this method calls
|
log | back to summary |
---|---|
public default void log(String format, Object... params) Logs a message with an optional list of parameters. Implementation Specification The default implementation for this method calls
|
on | back to summary |
---|---|
public default boolean on() Tells whether this logger is on. Implementation Specification The default implementation for this method calls
|