Click or drag to resize

LogManager Class

Global class used to manage application logging.
Inheritance Hierarchy
SystemObject
  Neon.DiagnosticsLogManager

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

The LogManager type exposes the following members.

Constructors
  NameDescription
Public methodLogManager
Default constructor.
Top
Properties
  NameDescription
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 propertyLogLevel
Specifies the level of events to be actually recorded. This defaults to Info.
Top
Methods
  NameDescription
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 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 methodSetLogLevel
Sets the log level by safely parsing a string.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also