LoggingEvent Constructor (LoggingEventData) | Apache log4net™ SDK Documentation

Initializes a new instance of the LoggingEvent class using specific data.

Namespace: log4net.Core
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public LoggingEvent(
    	LoggingEventData data
    )

    Public Sub New (
    	data As LoggingEventData
    )

    public:
    LoggingEvent(
    	LoggingEventData data
    )

    new :
            data : LoggingEventData -> LoggingEvent

#### Parameters

data
  Type: log4net.Core
  LoggingEventData
  Data used to initialize the logging event.

Remarks

This constructor is provided to allow a LoggingEvent to be created independently of the log4net framework. This can be useful if you require a custom serialization scheme.

Use the [M:GetLoggingEventData(FixFlags)] method to obtain an instance of the LoggingEventData class.

This constructor sets this objects Fix flags to All, this assumes that all the data relating to this event is passed in via the data parameter and no other data should be captured from the environment.

See Also

#### Reference

LoggingEvent Class
LoggingEvent Overload
log4net.Core Namespace