public final class LogFileConfiguration extends Object
FileLogger
class.
These options must be set atomically so they won't take effect unless a new
configuration object is set on the logger. Attempting to modify an in-use
configuration object will result in an exception being thrown.Constructor and Description |
---|
LogFileConfiguration(LogFileConfiguration config)
Constructs a file configuration object based on another one so
that it may be modified
|
LogFileConfiguration(String directory)
Constructs a file configuration object with the given directory
|
LogFileConfiguration(String directory,
LogFileConfiguration config)
Constructs a file configuration object based on another one but changing
the directory
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getDirectory()
Gets the directory that the logs files are stored in.
|
int |
getMaxRotateCount()
Gets the number of rotated logs that are saved (i.e.
|
long |
getMaxSize()
Gets the max size of the log file in bytes.
|
int |
hashCode() |
LogFileConfiguration |
setMaxRotateCount(int maxRotateCount)
Sets the number of rotated logs that are saved (i.e.
|
LogFileConfiguration |
setMaxSize(long maxSize)
Sets the max size of the log file in bytes.
|
LogFileConfiguration |
setUsePlaintext(boolean usePlaintext)
Sets whether or not to log in plaintext.
|
boolean |
usesPlaintext()
Gets whether or not CBL is logging in plaintext.
|
public LogFileConfiguration(@NonNull String directory)
directory
- The directory that the logs will be written topublic LogFileConfiguration(@NonNull LogFileConfiguration config)
config
- The other configuration to copy settings frompublic LogFileConfiguration(@NonNull String directory, @Nullable LogFileConfiguration config)
directory
- The directory that the logs will be written toconfig
- The other configuration to copy settings from@NonNull public LogFileConfiguration setUsePlaintext(boolean usePlaintext)
usePlaintext
- Whether or not to log in plaintextpublic int getMaxRotateCount()
@NonNull public LogFileConfiguration setMaxRotateCount(int maxRotateCount)
maxRotateCount
- The number of rotated logs to be savedpublic long getMaxSize()
@NonNull public LogFileConfiguration setMaxSize(long maxSize)
maxSize
- The max size of the log file in bytespublic boolean usesPlaintext()
@NonNull public String getDirectory()