LoggerPro (1.0)

A simple, pluggable and modern logging framework for Delphi

Class TLoggerProFileAppender

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TLoggerProFileAppender = class(TLoggerProAppenderBase)

Description

The default file appender

To learn how to use this appender, check the sample file_appender.dproj

Hierarchy

Overview

Fields

Public internal const DEFAULT_LOG_FORMAT = '%0:s [TID %1:-8d][%2:-10s] %3:s [%4:s]';
Public internal const DEFAULT_MAX_BACKUP_FILE_COUNT = 5;
Public internal const DEFAULT_MAX_FILE_SIZE_KB = 1000;

Methods

Public constructor Create(aMaxBackupFileCount : Integer = DEFAULT_MAX_BACKUP_FILE_COUNT; aMaxFileSizeInKiloByte: Integer = DEFAULT_MAX_FILE_SIZE_KB; aLogsFolder: string = ''; aFileAppenderOptions: TFileAppenderOptions = []; aLogFormat: string = DEFAULT_LOG_FORMAT); reintroduce;
Public procedure Setup; override;
Public procedure TearDown; override;
Public procedure WriteLog(const aLogItem: TLogItem); overload; override;

Description

Fields

Public internal const DEFAULT_LOG_FORMAT = '%0:s [TID %1:-8d][%2:-10s] %3:s [%4:s]';

Defines the default format string used by the TLoggerProFileAppender.

The positional parameters are the followings:

  1. TimeStamp

  2. ThreadID

  3. LogType

  4. LogMessage

  5. LogTag

Public internal const DEFAULT_MAX_BACKUP_FILE_COUNT = 5;

Defines number of log file set to mantain during logs rotation

Public internal const DEFAULT_MAX_FILE_SIZE_KB = 1000;

Defines the max size of each log file

The actual meaning is: "If the file size is > than DEFAULT_MAX_FILE_SIZE_KB then rotate logs.

Methods

Public constructor Create(aMaxBackupFileCount : Integer = DEFAULT_MAX_BACKUP_FILE_COUNT; aMaxFileSizeInKiloByte: Integer = DEFAULT_MAX_FILE_SIZE_KB; aLogsFolder: string = ''; aFileAppenderOptions: TFileAppenderOptions = []; aLogFormat: string = DEFAULT_LOG_FORMAT); reintroduce;
 
Public procedure Setup; override;
 
Public procedure TearDown; override;
 
Public procedure WriteLog(const aLogItem: TLogItem); overload; override;
 
Copyright 2016 Daniele Teti
Generated by PasDoc 0.14.0.