THotLog |
[ Home ] |
Using tags to retrieve or format data |
Tags come into consideration only when using one of the
overloaded definitions of THotLog
"parsing methodes" hLog.Add(...).
Tags are not case sensitive.
Tags are Standalone or inline ones.
2 - Inline tags: information retrieval |
Inline tags can be used for information retrieval or string formating.
Disk, RAM and Heap can be logged with standalone
tags or inline ones.
Each of them has three different inline tags, allowing to output more
or less formatted values.
Tag Output -------------------------------------------------------- For Delphi '{Heap-}' // [Heap monitor]: Small Blocks=848, Size=28 MB, Reserved=1 MB, Medium Blocks=0, Size=0 MB, Reserved=0 MB, Large Blocks=0, Size=0 MB, Reserved=0 MB '{Heap--}' // [Heap monitor]: (Small Blocks: 848, 28 MB, 1 MB, Medium Blocks: 0, 0, 0, Large Blocks: 0, 0, 0) '{Heap---}' // ((848, 28 MB, 1 MB), (0, 0 MB, 0 MB), (0, 0 MB, 0 MB)) and for Lazarus '{Heap-}' // [Heap monitor]: Maximum heap size=229.376, Maximum used heap size=2.688, Current heap size=229.376, Currently used heap size=2.688, Currently free on heap=226.688 '{Heap--}' // [Heap monitor]: (229.376, 3.392, 229.376, 3.392, 225.984) '{Heap---}' // (229.376, 4.032, 229.376, 4.032, 225.344) '{RAM-}' // [RAM monitor]: Total Physical=8.102 MB, Available=3.051 MB, Total Page File=16.201 MB, Available=10.135 MB, Total Virtual=8.388.608 MB, Available=8.388.509 MB, Load=62% '{RAM--}' // [RAM monitor]: (Physical: 8.102 MB, 3.051 MB, Page File: 16.201 MB, 10.135 MB, Virtual: 8.388.608 MB, 8.388.509 MB, 62%) '{RAM---}' // ((8.102 MB, 3.051 MB), (16.201 MB, 10.135 MB), (8.388.608 MB, 8.388.509 MB), 62%) '{disk-}' // [Disk monitor]: B: (Free-User=98.744 MB, Total-User=99.332 MB, Free-Disk=98.744 MB), C: (Free-User=159.643 MB, Total-User=238.373 MB, Free-Disk=159.643 MB), D: (Free-User=578.343 MB, Total-User=1.483.855 MB, Free-Disk=578.343 MB), E: (Free-User=42.866 MB, Total-User=99.904 MB, Free-Disk=42.866 MB), G: (Free-User=223.136 MB, Total-User=323.869 MB, Free-Disk=223.136 MB), O: (Free-User=65 MB, Total-User=100 MB, Free-Disk=65 MB), P: (Free-User=58 MB, Total-User=94 MB, Free-Disk=58 MB) '{disk--}' // [Disk monitor]: B: (98.744 MB, 99.332 MB, 98.744 MB), C: (159.643 MB, 238.373 MB, 159.643 MB), D: (578.343 MB, 1.483.855 MB, 578.343 MB), E: (42.866 MB, 99.904 MB, 42.866 MB), G: (223.136 MB, 323.869 MB, 223.136 MB), O: (65 MB, 100 MB, 65 MB), P: (58 MB, 94 MB, 58 MB) '{disk---}' // ((B: 98.744 MB, 99.332 MB, 98.744 MB), (C: 159.644 MB, 238.373 MB, 159.644 MB), (D: 578.343 MB, 1.483.855 MB, 578.343 MB), (E: 42.866 MB, 99.904 MB, 42.866 MB), (G: 223.136 MB, 323.869 MB, 223.136 MB), (O: 65 MB, 100 MB, 65 MB), (P: 58 MB, 94 MB, 58 MB))See also "Monitoring RAM and Heap".
Application object information
Some of your programm characteristics can be logged with
Tag Output -------------------------------------------------------- '{app_name}' // The name of the programm '{app_path}' // The path of the programm '{app_lfn}' // Both path and name of the programm '{app_ver}' // Programm version : Major, minor revision and build, splitted by dots. '{app_prm-}' // The list of the parameters recieved, outputed on a single line
Date and time
Date and time tags are
Tag Output -------------------------------------------------------- '{dte}' // The current date, iso (yyyy-mm-dd) '{hms}' // The current time, iso (hh:mm:ss) '{now}' // Both date and time, space separator (yyyy-mm-dd hh:mm:ss) '{gtc}' // GetTickCount value '{dhg}' // Date time and GTC.
Temporary displaying or ooverriding line numbers
THotLog maintains a count of outputed lines. Line numbers can be added
by using ModifyLineNumbering( ).
The global setting can also be temporary changed using tags
'{lNum}' // Will output the current line number in the string parsed, at the place occupied by the tag '{lNumOff}' // No line numbers. lNumOff tag impacts the string or stringlist actually parsed
THotLog |