Table of Contents

Class LogManager

Namespace
Dynamicweb.Logging
Assembly
Dynamicweb.Core.dll

The log manager takes care of the logging engine and creates a log manager instance if it is missing. Use Current.GetLogger(string) to get a logging instance. Log files are by default stored in /Files/System/Logs/{LogName} folder.

public class LogManager
Inheritance
LogManager
Inherited Members

Constructors

LogManager(ILoggerProvider)

Creates loggerManager instance injecting logProvider object

public LogManager(ILoggerProvider logProvider)

Parameters

logProvider ILoggerProvider

Properties

Current

Gets or sets current LogManager instance for file logging

public static LogManager Current { get; set; }

Property Value

LogManager

System

Gets a system LogManager instance for event logging

public static LogManager System { get; }

Property Value

LogManager

Methods

DisableTracing()

Disables tracing

public void DisableTracing()

EnableTracing()

Enables tracing

public void EnableTracing()

GetLogger(string)

Gets logger using its name

public ILogger GetLogger(string name)

Parameters

name string

Name as string

Returns

ILogger

Object implementing ILogger

GetLogger(string, string)

Gets logger instance using its name and identifier

public ILogger GetLogger(string name, string identifier)

Parameters

name string

Name as string

identifier string

Identifier as string

Returns

ILogger

Object implementing ILogger

ResetGlobalLogThreshold()

Resets global log threshold

public void ResetGlobalLogThreshold()

SetGlobalLogThreshold(LogLevel)

Sets global log threshold level

public void SetGlobalLogThreshold(LogLevel level)

Parameters

level LogLevel

LogLevel

To top