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

Reference for unit 'LazLogger'

Provides a logging framework for Lazarus applications.

uses

  System,

  Classes,

  sysutils,

  Types,

  Math,

  LazLoggerBase,

  

Defines base logging classes used in the Lazarus IDE.

  LazClasses,

  

Contains classes and routines used to implement free notifications and reference counting.

  LazFileUtils,

  

Contains types, procedures, and functions used for file and directory operations.

  LazStringUtils,

  

Contains routines used for string manipulation.

  LazUTF8;

  

Number of characters (codepoints) to get from the string.

Overview

LazLogger.pas provides logging facilities to write message to a file or stdout device. Messages can be logged plain, or enclosed in begin/end like blocks, adding indent to all messages between to points (blocks can be nested). It also has the ability to filter groups of messages.

It can read the command line and environment to find the desired filename. By default it looks for a --debug-log= argument on the command line or "appname"_debuglog in the system environment.

If no log name is found StdOut is used.

The easiest method is to use the unit and put "DebugLn"/ "DbgOut" / "DebugLnEnter"/ "DebugLnExit" in your code. This works without any further setup.

LazLogger.pas is part of the LazUtils package.


Version 3.2 Generated 2024-02-25 Home