TLogManager.GetLogger Method
Overloads
- TLogManager.GetLogger
- TLogManager.GetLogger(string)
- TLogManager.GetLogger(TClass)
- TLogManager.GetLogger(TObject)
TLogManager.GetLogger
Returns a logger with an empty name.
Syntax
Unit: Bcl.Logging
function TLogManager.GetLogger: ILogger; overload;
See also
TLogManager.GetLogger(string)
Returns a logger associated with the specified name.
Remarks
Loggers are cached by name. Subsequent calls with the same name return the same logger instance.
Syntax
Unit: Bcl.Logging
function TLogManager.GetLogger(const AName: string): ILogger; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | AName | string | The name to associate with the logger. |
Returns
An ILogger instance for the given name.
See also
TLogManager.GetLogger(TClass)
Returns a logger associated with the specified class.
Remarks
Uses the qualified class name as the logger name.
Syntax
Unit: Bcl.Logging
function TLogManager.GetLogger(Clazz: TClass): ILogger; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| Clazz | TClass | The class to associate with the logger. |
Returns
An ILogger instance for the given class.
See also
TLogManager.GetLogger(TObject)
Returns a logger associated with the class of the specified object.
Remarks
Uses the qualified class name of the object's class as the logger name.
Syntax
Unit: Bcl.Logging
function TLogManager.GetLogger(Obj: TObject): ILogger; overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| Obj | TObject | The object whose class is used to identify the logger. |
Returns
An ILogger instance for the object's class.