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
System
Gets a system LogManager instance for event logging
public static LogManager System { get; }
Property Value
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
stringName as string
Returns
GetLogger(string, string)
Gets logger instance using its name and identifier
public ILogger GetLogger(string name, string identifier)
Parameters
Returns
ResetGlobalLogThreshold()
Resets global log threshold
public void ResetGlobalLogThreshold()
SetGlobalLogThreshold(LogLevel)
Sets global log threshold level
public void SetGlobalLogThreshold(LogLevel level)