LoggingEvent Constructor (Type, ILoggerRepository, String, Level, Object, Exception) | Apache log4net™ SDK Documentation

Initializes a new instance of the LoggingEvent class from the supplied parameters.

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,
    	string loggerName,
    	Level level,
    	Object message,
    	Exception exception
    )

    Public Sub New (
    	callerStackBoundaryDeclaringType As Type,
    	repository As ILoggerRepository,
    	loggerName As String,
    	level As Level,
    	message As Object,
    	exception As Exception
    )

    public:
    LoggingEvent(
    	Type^ callerStackBoundaryDeclaringType,
    	ILoggerRepository^ repository,
    	String^ loggerName,
    	Level^ level,
    	Object^ message,
    	Exception^ exception
    )

    new :
            callerStackBoundaryDeclaringType : Type *
            repository : ILoggerRepository *
            loggerName : string *
            level : Level *
            message : Object *
            exception : Exception -> 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.
loggerName
  Type: System
  String
  The name of the logger of this event.
level
  Type: log4net.Core
  Level
  The level of this event.
message
  Type: System
  Object
  The message of this event.
exception
  Type: System
  Exception
  The exception for this event.

Remarks

Except TimeStamp, Level and LoggerName, all fields of LoggingEvent are filled when actually needed. Call [M:FixVolatileData()] to cache all data locally to prevent inconsistencies.

This method is called by the log4net framework to create a logging event.

See Also

#### Reference

LoggingEvent Class
LoggingEvent Overload
log4net.Core Namespace