Package wt.log4j.jmx
Interface FileAppenderMonitorMBean
- All Superinterfaces:
AppenderMonitorMBean,SelfEmailingMBean
Log4j file appender
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionvoidE-mail entire log file as attachment, optionally compressing it
Supported API: truevoidE-mail last portion of a log file
Supported API: trueString[]View all lines of this log file that match a specified regular expression.String[]View all lines of this log file that match a specified regular expression.String[]View all "entries" from this log file that match a specified regular expression.String[]View all "entries" from this log file that match a specified regular expression.voidsendLogToSupport(long callNumber, String description) Send log file to technical support
Supported API: trueString[]viewLog()View log file (or rather last "reasonable" portion thereof)
Supported API: trueString[]viewLog(long maxLines, long maxChars) View last portion of log file
Supported API: trueMethods inherited from interface wt.log4j.jmx.AppenderMonitorMBean
getAppenderClassname, getLayout, isFilteredMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
viewLog
View log file (or rather last "reasonable" portion thereof)
Supported API: true- Throws:
Exception
-
viewLog
View last portion of log file
Supported API: true- Parameters:
maxLines- Maximum number of lines to include; non-positive numbers imply no limitmaxChars- Maximum number of characters to include; non-positive numbers imply no limit- Throws:
Exception
-
searchLog
@MBeanOperationImpact(0) String[] searchLog(String searchRegexp, boolean numberLines) throws Exception View all lines of this log file that match a specified regular expression.
Supported API: true- Parameters:
searchRegexp- Regular expression to search withnumberLines- Whether resulting lines should include original line numbers- Throws:
Exception
-
searchLog
@MBeanOperationImpact(0) String[] searchLog(String searchRegexp, boolean numberLines, int maxLines) throws Exception View all lines of this log file that match a specified regular expression.
Supported API: true- Parameters:
searchRegexp- Regular expression to search withnumberLines- Whether resulting lines should include original line numbersmaxLines- Maximum lines to return from any given file (not including elision line); negative values imply no limit- Throws:
Exception
-
searchLog
@MBeanOperationImpact(0) String[] searchLog(String searchRegexp, String newEntryRegexp, boolean numberLines) throws Exception View all "entries" from this log file that match a specified regular expression.Lines which match 'newEntryRegexp' are interpreted as the beginning of new entries in the file whereas all other lines are interpreted as belonging to the same entry as the last such line. This allows one to specify a semi-heuristic regular expression to keep a log4j log line and its stack trace together, for instance.
Supported API: true- Parameters:
searchRegexp- Regular expression to search withnewEntryRegexp- Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is usednumberLines- Whether resulting lines should include original line numbers- Throws:
Exception
-
searchLog
@MBeanOperationImpact(0) String[] searchLog(String searchRegexp, String newEntryRegexp, boolean numberLines, int maxLines) throws Exception View all "entries" from this log file that match a specified regular expression.Lines which match 'newEntryRegexp' are interpreted as the beginning of new entries in the file whereas all other lines are interpreted as belonging to the same entry as the last such line. This allows one to specify a semi-heuristic regular expression to keep a log4j log line and its stack trace together, for instance.
Supported API: true- Parameters:
searchRegexp- Regular expression to search withnewEntryRegexp- Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is usednumberLines- Whether resulting lines should include original line numbersmaxLines- Maximum lines to return from any given file (not including elision line); negative values imply no limit- Throws:
Exception
-
emailLog
@MBeanOperationImpact(0) void emailLog(String addressesOrEmailList, String subject, boolean compress) throws Exception E-mail entire log file as attachment, optionally compressing it
Supported API: true- Parameters:
addressesOrEmailList- Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail tosubject- Subject to give e-mailcompress- Whether to compress file attachment- Throws:
Exception
-
emailLog
@MBeanOperationImpact(0) void emailLog(String addressesOrEmailList, String subject, long maxLines, long maxChars) throws Exception E-mail last portion of a log file
Supported API: true- Parameters:
addressesOrEmailList- Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail tosubject- Subject to give e-mailmaxLines- Maximum number of lines to include; non-positive numbers imply no limitmaxChars- Maximum number of characters to include; non-positive numbers imply no limit- Throws:
Exception
-
sendLogToSupport
@MBeanOperationImpact(0) void sendLogToSupport(long callNumber, String description) throws Exception Send log file to technical support
Supported API: true- Parameters:
callNumber- Existing technical support call number to associate this data withdescription- Description to give data- Throws:
Exception
-