ZylSerialPort Delphi & C++Builder Component

Class TExceptionLogger

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type TExceptionLogger = class(TObject)

Description

Exception logger class.

Hierarchy

Overview

Fields

Public ExceptionLogFile: string;
Public LogDateTime: boolean;
Public Enabled: boolean;

Methods

Public constructor Create;
Public procedure WriteLog(const str: string); overload;
Public procedure WriteLog(const e: Exception); overload;

Description

Fields

Public ExceptionLogFile: string;

Log file full path. The default value is CommonAppDataDir\ZylSerialPortExceptionLog.log

Public LogDateTime: boolean;

If this property is true, date-time will be added at the beginning of each line.

Public Enabled: boolean;

If this property is true, exceptions will be logged in the log file.

Methods

Public constructor Create;

Constructor.

Public procedure WriteLog(const str: string); overload;

Writes a line in the log file.

Parameters
str
String to be written.
Public procedure WriteLog(const e: Exception); overload;

Writes the message of an exception in the log file. The line will start with 'EXCEPTION:'

Parameters
e
Exception to be written.
Copyright © 2003 - 2025 by Zyl Soft. All rights reserved.
Generated by PasDoc 0.16.0.