TLogManager Class
Singleton log manager that provides centralized access to loggers.
Remarks
Use TLogManager.Instance or the LogManager function to access the singleton instance. The log manager maintains a cache of loggers by name and delegates logger creation to the assigned Factory. When the factory is changed, all existing wrapper loggers are automatically updated to use loggers from the new factory.
Syntax
Unit: Bcl.Logging
TLogManager = class(TObject);
Constructors
| Name | Description |
|---|---|
| Create | Creates a new TLogManager instance with a default factory. |
Methods
| Name | Description |
|---|---|
| Instance | Returns the singleton instance of TLogManager, creating it if necessary. |
| GetLogger | Overloaded GetLogger GetLogger(string) GetLogger(TClass) GetLogger(TObject) |
Properties
| Name | Description |
|---|---|
| Factory | Gets or sets the logger factory used to create new loggers. |