Dec 172017
Log and control system use.
File LOGSYS2.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
Log and control system use.
File Name File Size Zip Size Zip Type
NLOG.BAT 3591 1092 deflated
NLOG.DOC 4814 1907 deflated
SETDIR.COM 1339 1126 deflated
SETDIR.DOC 1098 540 deflated
SETGLOB.COM 1110 929 deflated
SETGLOB.DOC 796 411 deflated
SETNOW.COM 1307 1121 deflated
SETNOW.DOC 2364 1077 deflated
SETREAD.COM 1581 1321 deflated
SETREAD.DOC 4096 1393 deflated

Download File LOGSYS2.ZIP Here

Contents of the NLOG.DOC file

Customizable logging system

Copyright 1986, Arnold B. Krueger Grosse Pointe Woods, MI 48236
Non-Commerical use permitted. Commercial users: contact ARNY KRUEGER
at EXEC-PC (414-964-5160).

I have tried many usage logging systems, and have found that they all seem to
fall short. The NLOG system is my attempt to address the problems I have
encountered which are:

* Some of my youg operators like to enter garbage into the database

* Collecting log-in time is easy, collecting log-outs is hard because
operators can just turn the computer off.

* During program development, one can end up booting many times, and
I wanted to get through log-in ASAP.

* Everybody has their own needs, so I wanted to have something that
was easy to customize, but needed no special language processors

The NLOG system is written in the DOS .BAT language with a few extensions that
are included in this .ARC file. To install it, you will need to tailor it
some, as this is operational code from my system, and it will take some changes
to meet your needs.


I. Modifying the NLOG.BAT file:

Near the top of the file is the file location customization section.
logdir The full name of the directory is where the log files are

progdir The full name of the directory where the log programs SETNOW
and SETREAD are found.

rem Customization section start:
set logdir=c:\$temp
set progdir=c:\utility\
rem Customization section end:

Further down is a section where the initials of authorized users of
the system are validated. The initials of the users are the
capitalized JSK, DLK, ... etc, below. The z is appended to avoid
syntax errors if a user replies with just a carriage return.
Alter this portion of the .BAT file as required by your situation.

echo Enter your initials, then
%progdir%setread who /u
if z%who% == zJSK goto gotwho
if z%who% == zDLK goto gotwho
if z%who% == zSAK goto gotwho
if z%who% == zSLK goto gotwho
if z%who% == zABK goto gotwho
echo Only Krueger household initials are accepted, not %who%!!!
goto getwho

if %who% == JSK set username=Joe
if %who% == DLK set username=Dan
if %who% == SAK set username=Sarah
if %who% == SLK set username=Sue
if %who% == ABK set username=Arny
echo %username%, please type Business or Pleasure (B or P)

II. Modifying your AUTOEXEC.BAT file:

rem login the usage:
set progdir=c:\utility\
%comspec% /e:640 /c=c:\utility\nlog

The set line duplicates the line you updated in NLOG. In this
application, it controls checkpointing (see below).

This %COMSPEC% line is appropriate for DOS 3.2. For DOS 3.1 modify the
/e parameter by dividing by 16. In the example this means changing
the 640 to 40.

III. Modifying your CONFIG.SYS file:

The NLOG batch file will add some variables to the environment.
It is recommended that you extend the size of the environment as

SHELL=C:\ /p /e:640

Again, this is a DOS 3.2 version. For DOS 3.1 change the 640 to 40
since DOS 3.1 sizes the environment in paragraphs. DOS 3.2 sizes
the environment in bytes.

IV. Checkpointing. A key concept of this system is that checkpoints
are taken as people use various .BAT files on your system.
The checkpoint then contains a fair estimate of the last time of
use of your computer. If the user logs out explicitly, then the
checkpoint file is deleted. If he does not, the next time he
attempts login, he will be prompted to close the previous session.
He can do this three ways:

1. Continue the previous session.
2. Logout the previous session using checkpoint data
3. Logout by typing in new time/date information.

The following code should be copied all over the .BAT files on your
system to ensure the checkpoint files are kept up to date:

c:\utility\setdir autdir
cd %logdir%
echo %date% %time% C checkpoint >newlog.log
cd %autdir%
set autdir=

 December 17, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>