Sign in Join
FPDoc Onlineexperiment

TLazLogger class

In unit LazLoggerBase

Defines the base class for loggers used in the Lazarus IDE.

Declaration

pascal
TLazLogger = class(TRefCountedObject)

Inheritance

  1. TLazLogger
  2. 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

IsInitializedprotectedIndicates whether the Init method has already been called for the logger class instance.
NestLvlIndentpublicIndicates the current nesting level for call to the logger class instance.
MaxNestPrefixLenpublicIndicates the maximum length for the nesting prefix used when values are output in the logger.
LogGroupListpublicContainer with the group instances for the logger.
UseGlobalLogGroupListpublicIndicates if the global DebugLoggerGroupList is used as the value for the LogGroupList property.
BlockHandlerpublicProvides indexed access to the Block handlers for the logger type.

Methods

DoInitprotectedPerforms actions needed to initialize the logger class instance.
DoFinishprotectedPerforms actions needed to finalize the logger class instance.
IncreaseIndentprotectedIncreases the nesting level for the logger.
DecreaseIndentprotectedDecreases the nesting level for the logger.
IndentChangedprotectedPerforms actions needed when the nesting level for the logger has been changed.
GetBlockHandlerprotectedGets the value for the indexed BlockHandler property.
DoDbgOutprotectedImplements the DbgOut method for the logger type.
DoDebugLnprotectedImplements the DebugLn method for the logger type.
DoDebuglnStackprotectedImplements the DebugLnStack method for the logger type.
ArgsToStringprotectedConverts the specified array of values to a string which can be displayed using the output methods for the logger type.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
AssignpublicCopies values from the logger instance in Src into the current class instance.
InitpublicInitializes the logger class instance.
FinishpublicFinalizes the logger class instance.
CurrentIndentLevelpublicGets the current indentation level for the logger.
RegisterLogGrouppublicCreates a log group and optionally sets its enabled status.
FindOrRegisterLogGrouppublicRetrieves or creates a log group for the logger.
AddBlockHandlerpublicAdds the specified handler for blobk Enter and Exit conditions.
RemoveBlockHandlerpublicRemoves the specified block handler for the logger type.
BlockHandlerCountpublicGets the number of block handlers added to the logger type.
DebuglnStackpublicCalls DoDebuglnStack to write the message in s when the logger has been enabled.
DbgOutpublicGenerates a log message with formatted value(s) for the specified type(s).
DebugLnpublicWrites a message to the logger class instance at the current indentation level.
DebugLnEnterpublicWrites an optional log message and increases the indentation level for the logger.
DebugLnExitpublicDecreases the indentation level for the logger and writes an optional log message.
DumpExceptionBackTracepublicWrites addresses and exception frames representing the backtrace for an exception.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.