java.lang.Object |
↳ |
com.microstrategy.web.app.utils.log.GlobClassMethodTracingFilter |
Class Overview
This filter utilizes glob expressions (wildcards: '*' and '?') to filter class and methods.
It also features a tracing mechanism that if turned on
will associate an exception with a log record, if it does not already have
one. See configure(String)
for details.
Requires the Jakarta ORO library.
Summary
Public Methods |
void
|
configure(String propPrefix)
This filter serves to filter out log records based on class-method name
patterns, and user names.
|
boolean
|
isLoggable(LogRecord record)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
com.microstrategy.utils.log.Configurable
abstract
void
|
configure(String prefix)
Requests the configurable object to configure itself.
|
|
From interface
com.microstrategy.utils.log.Filter
|
Constants
public
static
final
String
PROPERTY_CODES_EXCLUDE
Constant Value:
"errorCodesExclude"
public
static
final
String
PROPERTY_CODES_INCLUDE
Constant Value:
"errorCodesInclude"
public
static
final
String
PROPERTY_EXCLUDE
Constant Value:
"exclude"
public
static
final
String
PROPERTY_INCLUDE_SESSIONLESS
Constant Value:
"includeSessionless"
public
static
final
String
PROPERTY_PATTERN
Constant Value:
"pattern"
public
static
final
String
PROPERTY_TRACE
public
static
final
String
PROPERTY_USER_NAMES
Constant Value:
"userNames"
Public Constructors
public
GlobClassMethodTracingFilter
()
Public Methods
public
void
configure
(String propPrefix)
This filter serves to filter out log records based on class-method name
patterns, and user names.
- error-codes-excludeComma delimited of error codes to exclude.
See
WebAPIErrorCodes
.
- error-codes-includeComma delimited of error codes to include.
All others are excluded.
See
WebAPIErrorCodes
.
- pattern. List of class + method names delimited by the new
line, or semi-colon characters. Methods are prefixed by the "#" character,
such as IDSSXMLObjectServer#createFolder. If no pattern is specified,
everything is admitted. The pattern field is based upon the
org.apache.oro.text.GlobCompiler (detailed description below).
- exclude. Patterns to exclude. See "pattern" for declaration.
- trace. Adds stack traces to ENTRY log records if property
value is "true".
- userNames. Restrict records to a specific users with given full
names (this is not necessarily the same as the user login). Trailing
whitespace are ignored, and comparisons are case-insensitive.
User names are delimited by the newlines.
- includeSessionless. Whether to include logs that are not tied
a user session. By default this is false.
The pattern field uses the org.apache.oro.text.GlobCompiler
(http://jakarta.apache.org/oro) library. The expression syntax is based
on Unix shell glob expressions, and is used to simulate Win32 wildcards:
- * - Matches zero or more instances of any character. If the
STAR_CANNOT_MATCH_NULL_MASK option is used, * matches one or more
instances of any character.
- ? - Matches one instance of any character. If the
QUESTION_MATCHES_ZERO_OR_ONE_MASK option is used, ?
matches zero or one instances of any character.
- [...] - Matches any of characters enclosed by the brackets.
* and ? lose their special meanings within a character
class. Additionally if the first character following the opening bracket
is a ! or a ^, then any character not in the character
class is matched. A -
between two characters can be used to denote a range. A - at the
beginning or end of the character class matches itself rather than
referring to a range. A ] immediately following the opening [
matches itself rather than indicating the end of the character class,
otherwise it must be escaped with a backslash to refer to itself.
- \ - A backslash matches itself in most situations. But when
a special character such as a * follows it, a backslash
escapes the character, indicating that the special character
should be interpreted as a normal character instead of its special
meaning.
- All other characters match themselves.
Examples:
- *Server#* - matches any class that ends with the word "Server".
- *#[gs]et* - matches any getter or setter method.
- CDSSXMLReportServer#Get* - matches any getter method in the CDSSXMLReportServer class.
Parameters
propPrefix |
String The partial properties key.
|