| |
|
| java.lang.Object org.restlet.service.LogService
LogService | public class LogService (Code) | | Service providing access logging service. The implementation is fully based
on the standard logging mechanism introduced in JDK 1.4.
The default access log format follows the W3C Extended Log File Format
with the following fields used:
- Date (YYYY-MM-DD)
- Time (HH:MM:SS)
- Client address (IP)
- Remote user identifier (see RFC 1413)
- Server address (IP)
- Server port
- Method (GET|POST|...)
- Resource reference path (including the leading slash)
- Resource reference query (excluding the leading question mark)
- Response status code
- Number of bytes sent
- Number of bytes received
- Time to serve the request (in milliseconds)
- Host reference
- Client agent name
- Referrer reference
If you use Analog to generate your log
reports, and if you use the default log format, then you can simply specify
this string as a value of the LOGFORMAT command:
(%Y-%m-%d\t%h:%n:%j\t%S\t%u\t%j\t%j\t%j\t%r\t%q\t%c\t%b\t%j\t%T\t%v\t%B\t%f)
For custom access log format, see the syntax to use and the list of available
variable names in
org.restlet.util.Template .
See Also: Tutorial: Access
* logging See Also: java.util.logging author: Jerome Louvel (contact@noelios.com) |
Constructor Summary | |
public | LogService(boolean enabled) Constructor. |
Method Summary | |
public String | getLogFormat() Returns the format used. | public String | getLoggerName() Returns the name of the JDK's logger to use when logging calls. | public boolean | isEnabled() Indicates if the service should be enabled. | public boolean | isIdentityCheck() Indicates if the identity check (as specified by RFC1413) is enabled. | public void | setEnabled(boolean enabled) Indicates if the service should be enabled. | public void | setIdentityCheck(boolean enabled) Indicates if the identity check (as specified by RFC1413) is enabled. | public void | setLogFormat(String format) Sets the format to use when logging calls. | public void | setLoggerName(String name) Sets the name of the JDK's logger to use when logging calls. |
LogService | public LogService(boolean enabled)(Code) | | Constructor.
Parameters: enabled - True if the service has been enabled. |
getLogFormat | public String getLogFormat()(Code) | | Returns the format used.
The format used, or null if the default one is used. See Also: org.restlet.util.Template See Also: for format syntax and variables. |
getLoggerName | public String getLoggerName()(Code) | | Returns the name of the JDK's logger to use when logging calls.
The name of the JDK's logger to use when logging calls. |
isEnabled | public boolean isEnabled()(Code) | | Indicates if the service should be enabled.
True if the service should be enabled. |
isIdentityCheck | public boolean isIdentityCheck()(Code) | | Indicates if the identity check (as specified by RFC1413) is enabled.
Default value is false.
True if the identity check is enabled. |
setEnabled | public void setEnabled(boolean enabled)(Code) | | Indicates if the service should be enabled.
Parameters: enabled - True if the service should be enabled. |
setIdentityCheck | public void setIdentityCheck(boolean enabled)(Code) | | Indicates if the identity check (as specified by RFC1413) is enabled.
Parameters: enabled - True if the identity check is enabled. |
setLogFormat | public void setLogFormat(String format)(Code) | | Sets the format to use when logging calls. The default format matches the
one of IIS 6.
Parameters: format - The format to use when loggin calls. See Also: org.restlet.util.Template See Also: for format syntax and variables. |
setLoggerName | public void setLoggerName(String name)(Code) | | Sets the name of the JDK's logger to use when logging calls.
Parameters: name - The name of the JDK's logger to use when logging calls. |
|
|
|