RestCallLogger
@Deprecated public interface RestLogger
Modifier and Type | Interface and Description |
---|---|
static interface |
RestLogger.Null
Deprecated.
Represents no RestLogger.
|
Modifier and Type | Method and Description |
---|---|
void |
log(Level level,
String msg,
Object... args)
Deprecated.
Log a message.
|
void |
log(Level level,
Throwable cause,
String msg,
Object... args)
Deprecated.
Log a message to the logger.
|
void |
logObjects(Level level,
String msg,
Object... args)
Deprecated.
Same as
log(Level, String, Object...) excepts runs the arguments through SimpleJsonSerializer.DEFAULT_READABLE . |
void |
onError(HttpServletRequest req,
HttpServletResponse res,
RestException e)
Deprecated.
Callback method for logging errors during HTTP requests.
|
void |
setLevel(Level level)
Deprecated.
Sets the logging level for this logger.
|
void setLevel(Level level)
level
- The new level.void log(Level level, Throwable cause, String msg, Object... args)
level
- The log level.cause
- The cause.msg
- The message to log.args
- Optional MessageFormat
-style arguments.void log(Level level, String msg, Object... args)
level
- The log level.msg
- The message to log.args
- Optional MessageFormat
-style arguments.void logObjects(Level level, String msg, Object... args)
log(Level, String, Object...)
excepts runs the arguments through SimpleJsonSerializer.DEFAULT_READABLE
.
Serialization of arguments do not occur if message is not logged, so it's safe to use this method from within debug log statements.
logObjects(
level
- The log level.msg
- The message to log.args
- Optional MessageFormat
-style arguments.void onError(HttpServletRequest req, HttpServletResponse res, RestException e)
Typically, subclasses will override this method and log errors themselves.
The default implementation simply logs errors to the
Here's a typical implementation showing how stack trace hashing can be used to reduce log file sizes...
req
- The servlet request object.res
- The servlet response object.e
- Exception indicating what error occurred.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.