Interface LogFileAccess


  • @Taxonomy(stability=EXPERIMENTAL)
    public interface LogFileAccess
    Provides access to log files.
    Since:
    AS 9.0
    • Field Detail

      • MOST_RECENT_NAME

        static final String MOST_RECENT_NAME
        Value meaning the most current version of the log file.
        See Also:
        Constant Field Values
      • SERVER_KEY

        static final String SERVER_KEY
        Key designating the server.log log files. Not necessarily the same as the file name of the log file.
        See Also:
        Constant Field Values
      • ACCESS_KEY

        static final String ACCESS_KEY
        Key designating the access.log log file. Not necessarily the same as the file name of the log file.
        See Also:
        Constant Field Values
    • Method Detail

      • getLogFileKeys

        @ManagedAttribute
        String[] getLogFileKeys()
        Keys which may be used to specify which log file to access. Legal values include:
        Returns:
        a String[] of the legal keys which designate log files
      • getLogFileNames

        @ManagedOperation(impact=0)
        String[] getLogFileNames​(@Param(name="key")
                                 String key)
        The names returned are not full paths but the simple file names of the log files. The last name in the resulting String[] will always be that of the current log file. In other words if the String[] las length 3, then result[2] will be the name of the current log file.

        Note that it is possible for log file rotation to occur after making this call, thus rendering the list incomplete.

        The resulting names may be passed to getLogFile(java.lang.String, java.lang.String) to retrieve the contents.

        The only legal key supported is SERVER_KEY.

        Parameters:
        key - a key specifying the type of log file
        Returns:
        String[] of all log filenames
      • rotateAllLogFiles

        @ManagedOperation(impact=1)
        void rotateAllLogFiles()
        Rotate all log files as soon as possible. May return prior to the rotation occuring.