Home

About Us

Books

Free Stuff

Oh, So That's How It Works!

Fellow Magicians

Useful Links



Program

WWLOGGER

Version

1,0,0,5

Synopsis

Console Mode Batch File Activity Logger

WizardWrx Logo

Syntax

WWLOGGER is a console program, with the following syntax.

          WWLOGGER.exe LogFileName [-U|G|L] [-FFormatString] Message

where:          LogFileName   = Name of log file

FormatString   = Override Date format string

Switches:       F = Use specified custom format for date

U = Report UTC (GMT) Time (same as G)

G = Report GMT (UTC) Time (same as U)

L = Report Local Time (default)

WWLOGGER is intended to be run from a batch file or script, though it can, of course, be run directly from a command prompt.

Notes

Description

Given a file name, a message, and optional switches and format string for the date, append the message to a text file, along with a time stamp.

Files created by either version open directly in Windows Notepad.

By default, both versions of WWLOGGER report local time in YYYY/MM/DD hh:mm:ss format, where the tokens are defined as shown in Table 1below.

Token

Meaning

^YYYY

Year, always reported in 4 digits.

^MMM

Month abbreviation from Windows language table for the currently defined language, per Regional Settings.

^MMMM

Month name (spelled out) from Windows language table for the currently defined language, per Regional Settings.

^MM

Month number (01-12)

^DD

Day of month (01-31)

^hh

Hour of day (24 hour clock, 00-23)

^mm

Minutes past hour (00-59)

^ss

Seconds past minute (00-59)

^WW

First two (of possible three) letters of weekday abbreviation from Windows language table for the currently defined language, per Regional Settings.

^WWW

Weekday abbreviation from Windows language table for the currently defined language, per Regional Settings.

^WWWW

Weekday name from Windows language table for the currently defined language, per Regional Settings.

Table 1 - Date Format Tokens

The following rules apply to all tokens.

Table 2 below gives examples of format strings and the generated output.

Format String

Output Sample

^YYYY/^MM/^DD ^hh:^mm:^ss

2005/12/24 01:17:11

^WWW ^DD ^MMM ^YYYY ^hh:^mm:^ss UTC

Sat 24 Dec 2005 01:17:11 UTC

Table 2 - Sample Format Strings

The first format is the default used for data written to the log file. The second format is used to echo the current UTC time to the system console.

Installation

WWLOGGER consists of two stand alone executable files, WWLOGGER.exe and WWLOGGERU.exe, and a documentation file, WWLOGGER.pdf. Since neither program has Registry keys of its own, and both programs are self contained, no formal installation is required. Copy the files into any convenient location, such as a directory on your MS-DOS path. The latest versions is always posted here.

The MD5 digest of this file is 428e2297eca66ba17f5de3cb92eee188. You can use MD5WIN to verify the MD5 digest of this and other files.

Support

This program is free software. As such, it comes without support or a warranty. Nevertheless, I shall entertain questions about its use, ways that I could improve it, or problems that you have had with it. Naturally, I am very interested to learn how people use it. You can reach me by means of this form, which sends email directly to me.

License

This program is licensed under the GNU General Public License. Accordingly, all of the source code that went into its development is freely available. Since the program incorporates code from a statically linked library of custom functions, there are three elements, detailed in Table 3 below.

Location

Content

MD5 Digest

Program Source

Visual C++ Projects for WWLOGGER (ANSI and Unicode)

3e6ff52aa860ae58bc667467ba2720fd

P6CLIB1 Custom Function Library

Visual C++ Project for static library P6CLIB1

58649ced1c270aac3d6f40be1bc15102

P6CLIB1 Header Files

C Header files for static library P6CLIB1

36d4d3c7a0b74de34036acabd8d61d9c

Table 3 - Source Code for WWLOGGER

This program was created using Microsoft Visual C++ 6.0, and requires Microsoft Windows 95 or later. Although it could easily be made portable, I chose not to do so at this time, so that I could take advantage of the library of C functions that I developed for general internal use.

Revision History

Date

Version

Comment

2005/11/06

1.0.0.1

Initial, limited release.

2005/12/23

1.0.0.2

First feature complete version.

2005/12/24

1.0.0.3

Convert lookup tables into static data.

2005/12/25

1.0.0.4

Corrections to user documentation. No code changed.

2009/01/03

1.0.0.5

Echo the message to the console.

Author

David A. Gray, MBA, of Simple Soft Services, Inc., d/b/a WizardWrx.

Copyright

© 2005, 2009, Simple Soft Services, Inc., d/b/a WizardWrx. All rights reserved world wide.

The above copyright declaration applies to both the source and object forms of the programs, and to the functions from library P6CLIB1 that are incorporated therein. To the extend that such copyright conflicts with the GPL, the terms of the GPL govern.


P6C Contact Info

Copyright and Legal Notice