Show / Hide Table of Contents

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.

These built in settings can also optionally be overridden via a log4net XML configuration file.
Inheritance
System.Object
Log4NetConfig
Implements
ICloudShareSyncConfig
Namespace: Cloud_ShareSync.Core.Configuration.Types
Assembly: Cloud-ShareSync.Core.Configuration.dll
Syntax
public class Log4NetConfig : object, ICloudShareSyncConfig

Constructors

| Improve this Doc View Source

Log4NetConfig()

Declaration
public Log4NetConfig()
| Improve this Doc View Source

Log4NetConfig(Boolean)

Declaration
public Log4NetConfig(bool defaultsEnabled)
Parameters
Type Name Description
System.Boolean defaultsEnabled

Properties

| Improve this Doc View Source

ConfigurationFile

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>
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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 Source

ToString()

Returns the Log4NetConfig as a json string.

Declaration
public override string ToString()
Returns
Type Description
System.String

Implements

ICloudShareSyncConfig
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
About Me | Open Source Acknowledgements | Security
☀
☾