-
Notifications
You must be signed in to change notification settings - Fork 0
a3b598f4 f6dd cfa8 1aed 32c548bb6c76
ConsoleLogger.Write(TScope) Method (TScope, LogLevel, String, Exception, ValueTuple(String, Object)[])
This method writes the message as well as the exception for provided scope into the logging target using provided logging level.
Namespace: Plexdata.LogWriter.Logging.Standard
Assembly: Plexdata.LogWriter.Console.Standard (in Plexdata.LogWriter.Console.Standard.dll) Version: 1.0.3.1
C#
public void Write<TScope>(
TScope scope,
LogLevel level,
string message,
Exception exception,
params (string , Object )[] details
)
- scope
- Type: TScope
The instance of the type to get the logging scope from. - level
- Type: Plexdata.LogWriter.Definitions.LogLevel
The logging level to be used to tag the written logging data. - message
- Type: System.String
The message to be written. - exception
- Type: System.Exception
The exception to be written. - details
- Type: System.ValueTuple(String, Object)[]
An optional list of label-value-pair combinations containing additional information.
- TScope
- The type to get the logging scope from.
ILogger.Write(TScope)(TScope, LogLevel, String, Exception, ValueTuple(String, Object)[])
This method performs the actual writing of logging data into the logging target using a particular logging level. Be aware, nothing will happen if message is null
, empty
or consists only of white spaces and if exception is null
.
On the other hand, if the message is invalid but the exception is valid then the message text is taken from the exception instead.
The logging scope is intended to be more than just the type name. If type of parameter scope is for example a string then this string is used. If type of parameter scope is for example of type MemberInfo then the referenced member's Name is taken instead. In all other cases the scope text is either taken from the type's FullName or it is just the Name of type TScope. The usage of full or short name is determined from current settings.
ConsoleLogger Class
Write Overload
Plexdata.LogWriter.Logging.Standard Namespace