Skip to content

Log Struct

Definition

namespace Sharplog

public struct Log
Object
ValueType
   Log

Struct containing all information for a log.

Constructors

Name
Log(LogLevel, object, Type, MethodBase, string, Exception, Level, string, DateTime, string)

Properties

Name Type GET SET
Level LogLevel
Class Type
Function MethodBase
Message object
Tag string
Exception Exception
LevelSettings Level
Format string
Time DateTime
StackTrace string

Constructors

Log(LogLevel, object, Type, MethodBase, string, Exception, Level, string, DateTime, string)

public Log(
    LogLevel level, 
    object message, 
    Type @class, 
    MethodBase function,
    string tag, 
    Exception exception, 
    Level levelSettings, 
    string format, 
    DateTime time, 
    string stackTrace)

Initializes a new instance of the Log struct.

Parameter

level LogLevel ·
The level.
message object ·
The message.
@class Type ·
The class.

function MethodBase · The function.

tag string ·
The tag.
exception Exception ·
The exception.
levelSettings Level ·
The level settings.
format string ·
The format.
time DateTime ·
The time.
stackTrace string ·
The stackTrace.

Properties

Level

public LogLevel Level { get; set; }
Type: LogLevel

Gets or sets the level of the log.

Class

public Type Class { get; set; }
Type: Type

Gets or sets the sender type.

Function

public MethodBase Function { get; set; }
Type: MethodBase

Gets or sets the sender function.

Message

public object Message { get; set; }
Type: object

Gets or sets the message.

Tag

public string Tag { get; set; }
Type: string

Gets or sets the tag.

Exception

public Exception Exception { get; set; }
Type: Exception

Gets or sets the exception.

Format

public string Format { get; set; }
Type: string

Gets or sets the format of the log.

LevelSettings

public Level LevelSettings { get; set; }
Type: Level

Gets or sets the level settings.

Time

public DateTime Time { get; set; }
Type: DateTime

Gets or sets the level settings.

StackTrace

public string StackTrace { get; set; }
Type: DateTime

Gets or sets the stack trace.