Click or drag to resize

LogManager Class

A reasonable default implementation of an application log manager. See ILogManager for a description of how log managers work.
Inheritance Hierarchy

Namespace:  Neon.Diagnostics
Assembly:  Neon.Common (in Neon.Common.dll) Version: 2.14.0
public class LogManager : ILogManager, ILoggerProvider, 

The LogManager type exposes the following members.

Public methodLogManager
Default constructor.
Public propertyStatic memberDefault

The default ILogManager that can be used by applications that don't use dependency injection. This defaults to an instance of LogManager but can be set to something else for unit tests or early in application startup.

Applications that do use dependency injection can obtain this by default via ServiceContainer.

Public propertyStatic memberDisabled
Returns a log-nothing log manager.
Public propertyEmitIndex
Controls whether the index field is emitted. This is a counter start starts at zero for each application instance and is incremented for each event emitted to help reconstruct exactly what happened when the system time resolution isn't fine enough. This defaults to true.
Public propertyEmitTimestamp
Controls whether timestamps are emitted. This defaults to true.
Public propertyLoggerCreator
Public propertyLogLevel
Specifies the level required for events to be actually recorded.
Public propertyVersion
The version of the current program or null if not known. This should be formatted as a valid SemanticVersion when not null.
Public propertyStatic memberVersionRegex
Returns the Regex used for validating program version strings.
Public methodCreateLogger
Creates a logger.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)
Releases all associated resources.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLogger(String, String, FuncBoolean)
Returns a named logger.
Public methodGetLogger(Type, String, FuncBoolean)
Returns a logger to be associated with a specific type. This method supports both static and normal types.
Public methodGetLoggerT(String, FuncBoolean)
Returns a logger to be associated with a specific type. This method works only for non-static types.
Public methodGetNextEventIndex
Returns the next event index.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReset
Intended to reset the log manager to its default condition. Implementations may cxustomize what this actually does but the default LogManager implementation resets its emitted event counter to zewro, clears and cached loggers, and resets the LoggerCreator delegate.
Public methodSetLogLevel
Sets the log level by safely parsing a string.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
See Also