public interface RequestLogger
Request Logger records the requests sent to the server. After creating a document or query manager, you can set a logger on the manager. You can choose to log content sent to the server as well as requests.
FileHandle constitutes an exception to the ability to log content. Only the name of the file is logged.
| Modifier and Type | Field and Description |
|---|---|
static long |
ALL_CONTENT
Indicates that all content is copied to the log.
|
static long |
NO_CONTENT
Indicates that no content is copied to the log (the default).
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the log.
|
<T> T |
copyContent(T content)
Copies content to the log during request processing up to the length limit specified for the logger.
|
void |
flush()
Send buffered output to the log destination.
|
long |
getContentMax()
Returns how much content is copied to the log.
|
PrintStream |
getPrintStream()
Returns the underlying PrintStream used for logging.
|
boolean |
isEnabled()
Returns whether logging is active or suspended.
|
void |
setContentMax(long length)
Controls how much content is copied to the log (defaulting to NO_CONTENT).
|
void |
setEnabled(boolean enabled)
Suspend or resume logging.
|
static final long NO_CONTENT
Indicates that no content is copied to the log (the default).
static final long ALL_CONTENT
Indicates that all content is copied to the log.
long getContentMax()
Returns how much content is copied to the log.
void setContentMax(long length)
Controls how much content is copied to the log (defaulting to NO_CONTENT).
length - the limit on copying contentboolean isEnabled()
Returns whether logging is active or suspended.
void setEnabled(boolean enabled)
Suspend or resume logging.
enabled - the enablement of loggingPrintStream getPrintStream()
Returns the underlying PrintStream used for logging.
<T> T copyContent(T content)
Copies content to the log during request processing up to the length limit specified for the logger.
Ordinarily, this method is called internally during reading content from the database or writing content to the database. You may, however, use this method directly if convenient.
T - the type to returncontent - the copied contentvoid flush()
Send buffered output to the log destination.
void close()
Close the log.
Copyright © 2013-2017 MarkLogic Corporation.