mirror of
https://github.com/paweld/simple-logger
synced 2024-11-07 01:41:52 +01:00
770 B
770 B
LPDLogU
- Simple, thread-safe logger for FPC
/Lazarus
.
Logs saved to file, support for log archiving and compression.
File log name is application file name with .log
extension.
How to use
-
add
LPDLogU
unit touses
section -
add log with:
Logger.AddLog('Some text', ltError); //or with params Logger.AddLog('A: %d; B: %s; C: %s', [23, 'test', 'name'], ltDebug);
Log types:
ltInfo
ltError
ltDebug
ltWarning
ltFatal
ltTrace
ltSuccess
ltCritical
ltException
or
Logger.AddInfo('Some text'); Logger.AddDebug('Some text'); Logger.AddError('%d %d %d %s %s', [1, 2, 3, 'a', 'b']); //etc.