Package wt.log4j.jmx

Interface FileAppenderMonitorMBean

All Superinterfaces:
AppenderMonitorMBean, SelfEmailingMBean

public interface FileAppenderMonitorMBean extends AppenderMonitorMBean
Log4j file appender

Supported API: true

Extendable: true
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    emailLog(String addressesOrEmailList, String subject, boolean compress)
    E-mail entire log file as attachment, optionally compressing it

    Supported API: true
    void
    emailLog(String addressesOrEmailList, String subject, long maxLines, long maxChars)
    E-mail last portion of a log file

    Supported API: true
    searchLog(String searchRegexp, boolean numberLines)
    View all lines of this log file that match a specified regular expression.
    searchLog(String searchRegexp, boolean numberLines, int maxLines)
    View all lines of this log file that match a specified regular expression.
    searchLog(String searchRegexp, String newEntryRegexp, boolean numberLines)
    View all "entries" from this log file that match a specified regular expression.
    searchLog(String searchRegexp, String newEntryRegexp, boolean numberLines, int maxLines)
    View all "entries" from this log file that match a specified regular expression.
    void
    sendLogToSupport(long callNumber, String description)
    Send log file to technical support

    Supported API: true
    View log file (or rather last "reasonable" portion thereof)

    Supported API: true
    viewLog(long maxLines, long maxChars)
    View last portion of log file

    Supported API: true

    Methods inherited from interface wt.log4j.jmx.AppenderMonitorMBean

    getAppenderClassname, getLayout, isFiltered

    Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean

    emailThisMBean
  • Method Details

    • viewLog

      @MBeanOperationImpact(0) String[] viewLog() throws Exception
      View log file (or rather last "reasonable" portion thereof)

      Supported API: true
      Throws:
      Exception
    • viewLog

      @MBeanOperationImpact(0) String[] viewLog(long maxLines, long maxChars) throws Exception
      View last portion of log file

      Supported API: true
      Parameters:
      maxLines - Maximum number of lines to include; non-positive numbers imply no limit
      maxChars - 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 with
      numberLines - 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 with
      numberLines - Whether resulting lines should include original line numbers
      maxLines - 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 with
      newEntryRegexp - Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is used
      numberLines - 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 with
      newEntryRegexp - Regular expression which indicate the first line of an "entry"; if null or empty, the value of the Dumper MBean's DefaultNewEntryRegexp is used
      numberLines - Whether resulting lines should include original line numbers
      maxLines - 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 to
      subject - Subject to give e-mail
      compress - 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 to
      subject - Subject to give e-mail
      maxLines - Maximum number of lines to include; non-positive numbers imply no limit
      maxChars - 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 with
      description - Description to give data
      Throws:
      Exception