org.apache.turbine.services.logging
Class BaseRunDataFilter
java.lang.Object
|
+--org.apache.turbine.services.logging.BaseRunDataFilter
- All Implemented Interfaces:
- RunDataFilter
- public class BaseRunDataFilter
- extends java.lang.Object
- implements RunDataFilter
This class extracts data from RunData object. It is configured
by a string describing format of output.
Format description
Each token should be seperate by space. In output known token
will be replaced by coresponding data from RunData, unkonwn will be
returned unchanged on output.
Conversion token:
- %t - current Time
- %U - URL Requested
- %h - Remote Host
- %a - Remote Address
- %l - Remote User
- %p - Server Port
- %v - Server Name
- %m - Method
- %q - Query String
- %cp - Context Path
- %sid - Session Id
- %au - Authentication Type
- %ct - Content Type
- %enc - Character Encoding
- %pro - Protocol
- %sce - Scheme
- %cln - Content Length
- %ua - User Agent
- %ban - Banner Info
- %usr - User
- %cook - Cookies
- Version:
- $Id: BaseRunDataFilter.java,v 1.2 2002/07/11 16:53:26 mpoeschl Exp $
- Author:
- Tomasz Zielinski, Michal Majdan, Jon S. Stevens
Field Summary |
protected java.lang.String |
DELIM
|
protected java.lang.String |
format
applied format |
protected static java.util.Map |
methodNamesMap
table matching conversion tokens to methods names |
protected java.util.List |
pattern
parsed format |
Method Summary |
java.lang.String |
getString(RunData data)
For each field in tha pattern looking for method extracting data from
RunData, invokes the method, and adds return value to return value. |
void |
setFormat(java.lang.String format)
parses format string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
methodNamesMap
protected static java.util.Map methodNamesMap
- table matching conversion tokens to methods names
format
protected java.lang.String format
- applied format
pattern
protected java.util.List pattern
- parsed format
DELIM
protected final java.lang.String DELIM
BaseRunDataFilter
public BaseRunDataFilter()
setFormat
public void setFormat(java.lang.String format)
- parses format string
- Specified by:
setFormat
in interface RunDataFilter
- Following copied from interface:
org.apache.turbine.services.logging.RunDataFilter
- Parameters:
format
- - description which data should be extracted
getString
public java.lang.String getString(RunData data)
- For each field in tha pattern looking for method extracting data from
RunData, invokes the method, and adds return value to return value.
If there is no method for the token, adds token to return value
- Specified by:
getString
in interface RunDataFilter
- Parameters:
data
- - RunDate from which data will be extracted
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.