Class GlobClassMethodTracingFilter
- java.lang.Object
-
- com.microstrategy.web.app.utils.log.GlobClassMethodTracingFilter
-
- All Implemented Interfaces:
Configurable
,Filter
public class GlobClassMethodTracingFilter extends java.lang.Object implements Filter, Configurable
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. Seeconfigure(String)
for details. Requires the Jakarta ORO library.- Since:
- MicroStrategy Web 8.0.1
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_CODES_EXCLUDE
static java.lang.String
PROPERTY_CODES_INCLUDE
static java.lang.String
PROPERTY_EXCLUDE
static java.lang.String
PROPERTY_INCLUDE_SESSIONLESS
static java.lang.String
PROPERTY_PATTERN
static java.lang.String
PROPERTY_TRACE
static java.lang.String
PROPERTY_UNAMES
-
Constructor Summary
Constructors Constructor Description GlobClassMethodTracingFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(java.lang.String propPrefix)
This filter serves to filter out log records based on class-method name patterns, and user names.boolean
isLoggable(LogRecord record)
-
-
-
Field Detail
-
PROPERTY_TRACE
public static final java.lang.String PROPERTY_TRACE
- Since:
- MicroStrategy Web 8.0.2
- See Also:
- Constant Field Values
-
PROPERTY_PATTERN
public static final java.lang.String PROPERTY_PATTERN
- Since:
- MicroStrategy Web 8.0.2
- See Also:
- Constant Field Values
-
PROPERTY_EXCLUDE
public static final java.lang.String PROPERTY_EXCLUDE
- Since:
- MicroStrategy Web 8.1.1
- See Also:
- Constant Field Values
-
PROPERTY_UNAMES
public static final java.lang.String PROPERTY_UNAMES
- Since:
- MicroStrategy Web 8.0.2
- See Also:
- Constant Field Values
-
PROPERTY_INCLUDE_SESSIONLESS
public static final java.lang.String PROPERTY_INCLUDE_SESSIONLESS
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
PROPERTY_CODES_INCLUDE
public static final java.lang.String PROPERTY_CODES_INCLUDE
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
PROPERTY_CODES_EXCLUDE
public static final java.lang.String PROPERTY_CODES_EXCLUDE
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure(java.lang.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 com.microstrategy.web.app.utils.GlobPattern (detailed description below).
- exclude. Patterns to exclude. See "pattern" for declaration.
- trace. Adds stack traces to ENTRY log records if property value is "true".
- uNames. 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
GlobPattern
which inherently leveragesFileSystem.getPathMatcher(String)
for matching pattern. 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.
- *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.
- Specified by:
configure
in interfaceConfigurable
- Parameters:
propPrefix
- String The partial properties key.
- error-codes-excludeComma delimited of error codes to exclude.
See
-
isLoggable
public boolean isLoggable(LogRecord record)
- Specified by:
isLoggable
in interfaceFilter
- See Also:
configure(String)
-
-