LoggingEvent Constructor (Type, ILoggerRepository, LoggingEventData, FixFlags) | 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(
    	Type callerStackBoundaryDeclaringType,
    	ILoggerRepository repository,
    	LoggingEventData data,
    	FixFlags fixedData
    )

    Public Sub New (
    	callerStackBoundaryDeclaringType As Type,
    	repository As ILoggerRepository,
    	data As LoggingEventData,
    	fixedData As FixFlags
    )

    public:
    LoggingEvent(
    	Type^ callerStackBoundaryDeclaringType,
    	ILoggerRepository^ repository,
    	LoggingEventData data,
    	FixFlags fixedData
    )

    new :
            callerStackBoundaryDeclaringType : Type *
            repository : ILoggerRepository *
            data : LoggingEventData *
            fixedData : FixFlags -> LoggingEvent

#### Parameters

callerStackBoundaryDeclaringType
  Type: System
  Type
  The declaring type of the method that is the stack boundary into the logging system for this call.
repository
  Type: log4net.Repository
  ILoggerRepository
  The repository this event is logged in.
data
  Type: log4net.Core
  LoggingEventData
  Data used to initialize the logging event.
fixedData
  Type: log4net.Core
  FixFlags
  The fields in the struct that have already been fixed.

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.

The fixedData parameter should be used to specify which fields in the data struct have been preset. Fields not specified in the fixedData will be captured from the environment if requested or fixed.

See Also

#### Reference

LoggingEvent Class
LoggingEvent Overload
log4net.Core Namespace