@Taxonomy(stability=EXPERIMENTAL)
public interface LogFileAccess
Modifier and Type | Field and Description |
---|---|
static String |
ACCESS_KEY
Key designating the access.log log file.
|
static String |
MOST_RECENT_NAME
Value meaning the most current version of the log file.
|
static String |
SERVER_KEY
Key designating the server.log log files.
|
Modifier and Type | Method and Description |
---|---|
String |
getLogFile(String key,
String fileName)
The entire specified log file is read, converted into a String, and returned.
|
String[] |
getLogFileKeys()
Keys which may be used to specify which log file to access.
|
String[] |
getLogFileNames(String key)
The names returned are not full paths but the simple file
names of the log files.
|
void |
rotateAllLogFiles()
Rotate all log files as soon as possible.
|
void |
rotateLogFile(String key)
Rotate the log file of the specified type.
|
static final String MOST_RECENT_NAME
static final String SERVER_KEY
static final String ACCESS_KEY
@ManagedAttribute String[] getLogFileKeys()
SERVER_KEY
ACCESS_KEY
is not supported@ManagedOperation(impact=0) String[] getLogFileNames(@Param(name="key") String key)
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
.
key
- a key specifying the type of log file@ManagedOperation(impact=0) String getLogFile(@Param(name="key") String key, @Param(name="fileName") String fileName)
The only legal key supported is SERVER_KEY
.
key
- a legal key designating a log filefileName
- a log file name as returned by getLogFileNames(java.lang.String)
or
MOST_RECENT_NAME
if current log file is desired.getLogFileKeys()
@ManagedOperation(impact=1) void rotateAllLogFiles()
@ManagedOperation(impact=1) void rotateLogFile(@Param(name="key") String key)
getLogFileKeys()
.
Legal values include:
SERVER_KEY
ACCESS_KEY
is not supportedkey
- Copyright © 2018. All rights reserved.