Class Info |
|---|
public class LogConfig Log configuration class. |
Qualifier and Type | Method Name and Description |
|---|---|
int | Obtains the log file validity period, in days. |
int | Obtains the maximum number of saved log files. |
int | Obtains the size of a single log file, in MB. |
String | Obtains the path for storing log files. |
void | setFileExpiredTime(int fileExpiredTime) Sets the log file validity period, in days. |
void | setFileNum(int fileNum) Sets the maximum number of saved log files. |
void | setFileSize(int fileSize) Sets the size of a single log file, in MB. |
void | setLogPath(String logPath) Sets the path for storing log files. |
Constructor |
|---|
public LogConfig(String logPath) Builds a LogConfig instance. |
Parameters
Name | Description |
|---|---|
logPath | Path for storing log files. |
Constructor |
|---|
public LogConfig(String logPath, int fileSize, int fileNum, int fileExpiredTime) Builds a LogConfig instance. |
Parameters
Name | Description |
|---|---|
logPath | Path for storing log files. |
fileSize | Size of a single log file, in MB. The value ranges from 0 (exclusive) to 2. The default value is 2. If the entered value is not within the range, the default value will be used. |
fileNum | Maximum number of saved log files. The value ranges from 0 (exclusive) to 20. The default value is 20. If the entered value is not within the range, the default value will be used. |
fileExpiredTime | File validity period, in days. The value ranges from 0 (exclusive) to 5. The default value is 5. If the entered value is not within the range, the default value will be used. |
Method |
|---|
public int getFileExpiredTime() Obtains the log validity period, in days. |
Returns
Type | Description |
|---|---|
int | Log file validity period. |
Method |
|---|
public int getFileNum() Obtains the maximum number of saved log files. |
Returns
Type | Description |
|---|---|
int | Maximum number of saved log files. |
Method |
|---|
public int getFileSize() Obtains the size of a single log file, in MB. |
Returns
Type | Description |
|---|---|
int | Size of a single log file. |
Method |
|---|
public String getLogPath() Obtains the path for storing log files. |
Returns
Type | Description |
|---|---|
String | Path for storing log files. |
Method |
|---|
public void setFileExpiredTime(int fileExpiredTime) Sets the log file validity period, in days. |
Parameters
Name | Description |
|---|---|
fileExpiredTime | Log file validity period, in days. The value ranges from 0 (exclusive) to 5. The default value is 5. |
Method |
|---|
public void setFileNum(int fileNum) Sets the maximum number of saved log files. |
Parameters
Name | Description |
|---|---|
fileNum | Maximum number of saved log files. The value ranges from 0 (exclusive) to 20. The default value is 20. |