Class Log4NetConfig
Cloud-ShareSync instruments logging via a custom ILogger implementation (ref TelemetryLogger) that utilizes apache Log4Net for its backend.
The built in/default Log4Net configuration consists of a rolling log file appender
and colored console appender for all standard log messages.
OpenTelemetry traces are also exported, in json format, to a rolling log file appender.
Inheritance
Implements
Namespace: Cloud_ShareSync.Core.Configuration.Types
Assembly: Cloud-ShareSync.Core.Configuration.dll
Syntax
public class Log4NetConfig : object, ICloudShareSyncConfig
Constructors
| Improve this Doc View SourceLog4NetConfig()
Declaration
public Log4NetConfig()
Log4NetConfig(Boolean)
Declaration
public Log4NetConfig(bool defaultsEnabled)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | defaultsEnabled |
Properties
| Improve this Doc View SourceConfigurationFile
To override the default logging configuration specify the path to a log4net (xml) config file.
Declaration
public string? ConfigurationFile { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.String> |
ConsoleConfiguration
The configuration settings for the built in console log process.
This field is required if EnableConsoleLog is true.
Declaration
public ConsoleLogConfig ConsoleConfiguration { get; set; }
Property Value
| Type | Description |
|---|---|
| ConsoleLogConfig |
DefaultLogConfiguration
The configuration settings for the built in rolling log process.
This field is required if EnableDefaultLog is true.
Declaration
public DefaultLogConfig DefaultLogConfiguration { get; set; }
Property Value
| Type | Description |
|---|---|
| DefaultLogConfig |
EnableConsoleLog
Cloud-ShareSync implements a colored console appender if ConfigurationFile
is not set.
This field enables or disables the built in colored console configuration.
Declaration
public bool EnableConsoleLog { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
EnableDefaultLog
By default Cloud-ShareSync implements a custom rolling log file process if ConfigurationFile
is not set.
This field enables or disables the built in rolling log file configuration.
Declaration
public bool EnableDefaultLog { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
EnableTelemetryLog
Cloud-ShareSync implements a custom rolling log file process for
OpenTelemetry content if ConfigurationFile is not set.
This field enables or disables the built in telemetry log configuration.
Declaration
public bool EnableTelemetryLog { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TelemetryLogConfiguration
The configuration settings for the built in OpenTelemetry log export process.
This field is required if EnableTelemetryLog is true.
Declaration
public TelemetryLogConfig TelemetryLogConfiguration { get; set; }
Property Value
| Type | Description |
|---|---|
| TelemetryLogConfig |
Methods
| Improve this Doc View SourceToString()
Returns the Log4NetConfig as a json string.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |