Class TBrookLogger

Unit

Declaration

type TBrookLogger = class(TBrookComponent)

Description

Provides features for the application logging.

Hierarchy

Overview

Methods

Protected function GetActive: Boolean; virtual;
Protected procedure SetActive(const AValue: Boolean); virtual;
Protected function GetFileName: TFileName; virtual;
Protected procedure SetFileName(const AValue: TFileName); virtual;
Protected procedure SetOutput(const AValue: TBrookLogOutput); virtual;
Protected function GetOutput: TBrookLogOutput; virtual;
Public constructor Create(AOwner: TComponent); override;
Public class function GetServiceClass: TBrookLoggerClass;
Public class procedure RegisterService;
Public class procedure UnregisterService;
Public class function Service: TBrookLogger;
Public procedure Prepare; virtual;
Public procedure Unprepare; virtual;
Public procedure Log(const AType: TBrookLogType; const S: string; const ACode: Word; const E: Exception = nil); virtual; abstract;
Public procedure DoLog(const AType: TBrookLogType; const S: string; const ACode: Word; const E: Exception = nil); virtual;
Public procedure Custom(const S: string; const ACode: Word); virtual;
Public procedure Info(const S: string); virtual;
Public procedure Warn(const S: string); virtual;
Public procedure Debug(const S: string); virtual;
Public procedure Error(const S: string; E: Exception = nil); virtual;

Properties

Public property Active: Boolean read GetActive write SetActive;
Public property FileName: TFileName read GetFileName write SetFileName;
Public property Types: TBrookLogTypes read FTypes write FTypes;
Public property Output: TBrookLogOutput read GetOutput write SetOutput;
Public property Prepared: Boolean read FPrepared;
Public property AfterLog: TBrookLogEvent read FAfterLog write FAfterLog;
Public property BeforeLog: TBrookLogEvent read FBeforeLog write FBeforeLog;

Description

Methods

Protected function GetActive: Boolean; virtual;
 
Protected procedure SetActive(const AValue: Boolean); virtual;
 
Protected function GetFileName: TFileName; virtual;
 
Protected procedure SetFileName(const AValue: TFileName); virtual;
 
Protected procedure SetOutput(const AValue: TBrookLogOutput); virtual;
 
Protected function GetOutput: TBrookLogOutput; virtual;
 
Public constructor Create(AOwner: TComponent); override;
 
Public class function GetServiceClass: TBrookLoggerClass;

Return the service class provided by this class.

Public class procedure RegisterService;

Registers the service provided by this class.

Public class procedure UnregisterService;

Unregisters the service provided by this class.

Public class function Service: TBrookLogger;

Return an instance of this class.

Public procedure Prepare; virtual;

Prepare the logger broker.

Public procedure Unprepare; virtual;

Unprepare the logger broker.

Public procedure Log(const AType: TBrookLogType; const S: string; const ACode: Word; const E: Exception = nil); virtual; abstract;

Writes a log.

Public procedure DoLog(const AType: TBrookLogType; const S: string; const ACode: Word; const E: Exception = nil); virtual;

Writes a log triggering the AfterLog and (BeforeLog) events.

Public procedure Custom(const S: string; const ACode: Word); virtual;

Writes a custom log.

Public procedure Info(const S: string); virtual;

Writes an information log.

Public procedure Warn(const S: string); virtual;

Writes a warning log.

Public procedure Debug(const S: string); virtual;

Writes a debug log.

Public procedure Error(const S: string; E: Exception = nil); virtual;

Writes an error log.

Properties

Public property Active: Boolean read GetActive write SetActive;

Enables or disables the logger.

Public property FileName: TFileName read GetFileName write SetFileName;

Defines the name of the log file.

Public property Types: TBrookLogTypes read FTypes write FTypes;

The logger output types.

Public property Output: TBrookLogOutput read GetOutput write SetOutput;

The logger output mode.

Public property Prepared: Boolean read FPrepared;

Return True if broker is prepared.

Public property AfterLog: TBrookLogEvent read FAfterLog write FAfterLog;

Is triggered after the logger writes a log.

Public property BeforeLog: TBrookLogEvent read FBeforeLog write FBeforeLog;

Is triggered before the logger writes a log.


Generated by PasDoc 0.15.0.