BoBo² Guest
|
Posted: Tue Jun 24, 2008 11:00 am Post subject: LogText - Professional Logging [CMD+Dll] |
|
|
| Quote: | On the one hand Logtext is a command line utility which is invoked from within command line scripts (batch files).
It can store the output in log files and print it on a command line window, both at the same time or just one of them. It works as a filter (like, for instance, the command 'more') or as a command line utility which receives the text to log as a parameter.
On the other hand Logtext is a DLL (Direct Link Library) for developers which is loaded and used from within self-written applications.
What is Logtext capable of?
Logtext is easy to handle. For instance, the command line utility is called by using a command like
logtext logfile/application text [options] [maxlogs] [maxzips]to log text. The DLL is loaded with LoadLibrary () and the logging functions are invoked by using the addresses returned by GetProcAddress ().
Automatically deletes old log files.
Automatically compresses (packs) old log files (default format is .gz from the library zlib, but an external packer can be used as well).
Statements like 'Keep the most recent 5 log files uncompressed and pack the remaining files into an archive".
Automatic log file rotation (daily, weekly, monthly, yearly, or no rotation at all).
Dates in file names according to ISO 8601 (YYYY-MM-DD or YYYY-WXX).
Real-time logging via queue (FIFO buffer). Write operations into the log file and packing/compression are handled by a separate process thread. The calling process does not get delayed.
Rotation/compression can be handled via counter (for instance: "Check after 10,000 logged lines whether the log file has to be rotated/compressed").
Log files can be used as a ring buffer, i.e. the 'rotation' takes place within a single file. It is possible to distinguish between the maximum file size or a maximum amount of lines in the log file.
The log files are plain text files, i.e. they can be analysed by basically any arbitrary text editor (like for instance Notepad).
Logged lines always start with date and time in the format according to ISO 8601, alternatively with or without 'T' as a deliminator. Times additionally include the time zone by default.
The DLL logtext.dll can be configured outside the calling application via an Ini file (logtext.ini). For every application is an own section in this file available. Additionally, there is a [Default] section which is read for any application for which no section exists.
Logtext's internal actions like reading configuration, deleting and compressing log files are written to the log file as well. Of course, this behaviour can be suppressed by the caller.
How much is Logtext?
Logtext is for free!
[More..]
[Mehr..] |  |
|