|
Version 2.0
Downloads : 9 Thread-safe logging system for Delphi with multiple output targets, auto-pruning and severity tracking. |
|||||||
|---|---|---|---|---|---|---|---|
|
Free Delphi source code for a lightweight, thread-safe logger that writes to files, the console and VCL memos at the same time, from anywhere in your application. It uses a singleton, so there is no logger instance to create or pass around - add the outputs you want once at startup, then call TLogger.Write from any unit or thread. Why use it
What is in the download
Quick startAdd the units to your project or search path, register the outputs at startup, then log:uses
PBS.LIB.Log, PBS.LIB.Log.Disk;
TLogger.Add_Output (TFile_Log_Output.Create ('', 'MyApp'));
TLogger.Write ('Application started');
TLogger.Write ('Order Total', 42);
With an empty path the log files go to a logs folder next to the executable, one file per day, named MyApp_YYYYMMDD.log. The article linked below covers every option, the memo output, multiple log files and writing your own output class.Requirements
Version 2.0Adds automatic log file pruning, an On_Error hook for the file output, Write overloads for string, boolean and integer values against a label, and a Last_Severe property. Several file outputs can be active at once, eg. a main log and a separate error log. TLogger.Write no longer takes an ATime parameter; timestamps are controlled with the Include_TimeStamp property.Read the article : PBS Delphi Logger - Thread-safe logging with multiple outputs Free to use and modify |
|||||||
|
These links expire in one hour. Refresh the screen to extend the time.
|
|||||||