Class FileLogExporterOptions
Specifies the options used to configure a ConsoleJsonLogExporter.
Namespace: Neon.Diagnostics
Assembly: Neon.Common.dll
Syntax
public class FileLogExporterOptions
Constructors
FileLogExporterOptions()
Constructs an instance with reasonable settings.
Declaration
public FileLogExporterOptions()
Properties
FileLimit
Used to limit the size of log files. The current log file will be rotated when its size reaches or exceeds this value. This defaults to 10 MiB and cannot be less than 10KiB
Declaration
public long FileLimit { get; set; }
Property Value
Type | Description |
---|---|
long |
FlushAgressively
Controls whether the target log file will be flushed to disk after writing
log event batch. This defaults to true
.
Declaration
public bool FlushAgressively { get; set; }
Property Value
Type | Description |
---|---|
bool |
Format
Specifies the export format. This defaults to Human.
Declaration
public FileLogExporterFormat Format { get; set; }
Property Value
Type | Description |
---|---|
FileLogExporterFormat |
LogEventInterceptor
Used to intercept log events just before they are emitted by the exporter. You can use this for implementing logging related unit tests or modifying other event properties like the timestamp, labels, tags, etc.
Declaration
public LogEventInterceptor LogEventInterceptor { get; set; }
Property Value
Type | Description |
---|---|
LogEventInterceptor |
LogFileName
Specifies the name to use for the log file. This must be specified.
Declaration
public string LogFileName { get; set; }
Property Value
Type | Description |
---|---|
string |
LogFolder
Specifies the folder where the log file will be written. This must be specified.
Declaration
public string LogFolder { get; set; }
Property Value
Type | Description |
---|---|
string |
MaxLogFiles
Used to limit how many log files are retained. This must be greater than zero. A value of one indicates that log rotation will be disabled and the current log file will simply be cleared when its size exceeds FileLimit, effectively starting over.
This defaults to 10 log files.
Declaration
public int MaxLogFiles { get; set; }
Property Value
Type | Description |
---|---|
int |