TLazLogger class
Defines the base class for loggers used in the Lazarus IDE.
Declaration
TLazLogger = class(TRefCountedObject)Inheritance
- TLazLogger
- TRefCountedObject
Descends from it: TLazLoggerNoOutput TLazLoggerWithGroupParam
Description
TLazLogger is a TRefCountedObject descendant which implements the base class for the logger mechanism used in the Lazarus IDE and the LCL. TLazLogger defines the interface used for the various logger classes which write their content to a specific destination. Many of the method which perform the output are empty implementations, and must be re-implemented in descendent classes which write to a file or to the debugger.
Properties
IsInitialized | protected | Indicates whether the Init method has already been called for the logger class instance. |
NestLvlIndent | public | Indicates the current nesting level for call to the logger class instance. |
MaxNestPrefixLen | public | Indicates the maximum length for the nesting prefix used when values are output in the logger. |
LogGroupList | public | Container with the group instances for the logger. |
UseGlobalLogGroupList | public | Indicates if the global DebugLoggerGroupList is used as the value for the LogGroupList property. |
BlockHandler | public | Provides indexed access to the Block handlers for the logger type. |
Methods
DoInit | protected | Performs actions needed to initialize the logger class instance. |
DoFinish | protected | Performs actions needed to finalize the logger class instance. |
IncreaseIndent | protected | Increases the nesting level for the logger. |
DecreaseIndent | protected | Decreases the nesting level for the logger. |
IndentChanged | protected | Performs actions needed when the nesting level for the logger has been changed. |
GetBlockHandler | protected | Gets the value for the indexed BlockHandler property. |
DoDbgOut | protected | Implements the DbgOut method for the logger type. |
DoDebugLn | protected | Implements the DebugLn method for the logger type. |
DoDebuglnStack | protected | Implements the DebugLnStack method for the logger type. |
ArgsToString | protected | Converts the specified array of values to a string which can be displayed using the output methods for the logger type. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Assign | public | Copies values from the logger instance in Src into the current class instance. |
Init | public | Initializes the logger class instance. |
Finish | public | Finalizes the logger class instance. |
CurrentIndentLevel | public | Gets the current indentation level for the logger. |
RegisterLogGroup | public | Creates a log group and optionally sets its enabled status. |
FindOrRegisterLogGroup | public | Retrieves or creates a log group for the logger. |
AddBlockHandler | public | Adds the specified handler for blobk Enter and Exit conditions. |
RemoveBlockHandler | public | Removes the specified block handler for the logger type. |
BlockHandlerCount | public | Gets the number of block handlers added to the logger type. |
DebuglnStack | public | Calls DoDebuglnStack to write the message in s when the logger has been enabled. |
DbgOut | public | Generates a log message with formatted value(s) for the specified type(s). |
DebugLn | public | Writes a message to the logger class instance at the current indentation level. |
DebugLnEnter | public | Writes an optional log message and increases the indentation level for the logger. |
DebugLnExit | public | Decreases the indentation level for the logger and writes an optional log message. |
DumpExceptionBackTrace | public | Writes addresses and exception frames representing the backtrace for an exception. |
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
