Class LogFileConfiguration
A class that describes the file configuration for the 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.
Inheritance
Inherited Members
Namespace: Couchbase.Lite.Logging
Assembly: Couchbase.Lite.dll
Syntax
public sealed class LogFileConfiguration
Constructors
| Improve this Doc View SourceLogFileConfiguration(LogFileConfiguration)
Constructs a file configuration object based on another one so that it may be modified
Declaration
public LogFileConfiguration(LogFileConfiguration other)
Parameters
Type | Name | Description |
---|---|---|
LogFileConfiguration | other | The other configuration to copy settings from |
LogFileConfiguration(String)
Constructs a file configuration object with the given directory
Declaration
public LogFileConfiguration(string directory)
Parameters
Type | Name | Description |
---|---|---|
System.String | directory | The directory that logs will be written to |
LogFileConfiguration(String, LogFileConfiguration)
Constructs a file configuration object based on another one but changing the directory
Declaration
public LogFileConfiguration(string directory, LogFileConfiguration other)
Parameters
Type | Name | Description |
---|---|---|
System.String | directory | The directory that logs will be written to |
LogFileConfiguration | other | The other configuration to copy the other settings from |
Properties
| Improve this Doc View SourceDirectory
Gets the directory that the log files are stored in.
Declaration
public string Directory { get; }
Property Value
Type | Description |
---|---|
System.String |
MaxRotateCount
Gets or sets the number of rotated logs that are saved (i.e. if the value is 1, then 2 logs will be present: the 'current' and the 'rotated') Default value is DefaultLogFileMaxRotateCount
Declaration
public int MaxRotateCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
MaxSize
Gets or sets the max size of the log files in bytes. If a log file passes this size then a new log file will be started. This number is a best effort and the actual size may go over slightly. Default value is DefaultLogFileMaxSize
Declaration
public long MaxSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
UsePlaintext
Gets or sets whether or not to log in plaintext. The default is to log in a binary encoded format that is more CPU and I/O friendly and enabling plaintext is not recommended in production. Default value is DefaultLogFileUsePlainText
Declaration
public bool UsePlaintext { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |