[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'LazLogger' (#lazutils)

TLazLoggerFile.DoDbgOut

Performs actions needed to implement the DbgOut method for the logger class type.

Declaration

Source position: lazlogger.pas line 165

protected procedure TLazLoggerFile.DoDbgOut(

  s: string;

  AGroup: PLazLoggerLogGroup = Nil

); override;

Arguments

s

  

Log message formatted and written in the method.

Description

DoDbgOut is overridden in TLazLoggerFile to ensure that log message formatting and event handlers are used when the DbgOut method is called. Space characters are inserted at the start of the log message to reflect the current nesting level for the logger class. For multi-threaded usage, an internal critical section is used to protect the current nesting level while preparing the indentation spaces for the message.

DoDbgOut signals the OnDbgOutEx (when assigned) allow user-specified actions to be performed to handle the indentation level and information for the logger group specified in AGroup. If the log entry is handled in the OnDbgOutEx event handler, no additional actions are performed in the method.

The OnDbgOut event handler is signalled (when assigned) to allow user-specified actions to be performed when writing the log message. If the write operation is handled in the event handler, no additional actions are performed in the method. Otherwise, the WriteToFile method in FileHandle is called to write the log message to the device or file.

Version info

Modified in LazUtils version 3.0 to write logger group information.

See also

TLazLoggerFile.OnDbgOutEx

  

Event handler signalled to generate an extended log message with log group information.

TLazLoggerFile.OnDbgOutEx

  

Event handler signalled to generate an extended log message with log group information.

TLazLoggerFile.FileHandle

  

TLazLoggerFileHandle instance representing the file or device where log messages are written.

TLazLoggerWriteExEventInfo

  

Alias for the TLazLoggerWriteExEventInfo type in lazloggerbase.pas.


Version 4.0 Generated 2025-05-03 Home