comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: Dual_IO (2)
Date: Thu, 26 Jul 2001 15:37:20 GMT
Date: 2001-07-26T15:37:20+00:00	[thread overview]
Message-ID: <QOW77.7754$ar1.25040@www.newsranger.com> (raw)
In-Reply-To: mailman.996153031.25809.comp.lang.ada@ada.eu.org

In article <mailman.996153031.25809.comp.lang.ada@ada.eu.org>, Gautier
Write-only-address says...
>
>Hello - just a word to say that Dual_IO is now made
>- i.e. a package that outputs all I/O from/to Standard
>also to a log file. It is in paqs.zip @ URL below

I looked it over, and have the following comments.

1) Good work.

2) There appear to be no copyright notices or license information anywhere. As
Dr. Dewar is fond of pointing out, that means (at least in the US) that we are
not allowed *any* rights to the sources whatsoever. Is that really what you
want?

3) It stops a little short of a proper logging facility. One could be tacked
onto the top of it though. The requirements would be something like the
following (using the standard Enlglish shall/should requirement meanings):

There shall be a way to specify the name/location of the log file.
There shall be a routine that takes in a string to log, and a severity level. 
This routine shall:
..tack on the date/time and severity level to the front of the string.
..send the resulting string to standard output and the log file.
..be task-safe.

The logging routine should not hold the calling task while waiting for I/O.

The accepted severity levels shall be (in order of increasing severity):
Informational, Warning, Error, and Fatal.

Unfortunately, the actual writing to two places is the trivial part of this
code. I have a current implementation of this facility that did it in about 100
lines of code. Perhaps I'll do it myself sometime as a mini-Free Software
project. It'd be nice to have it where I don't have to rewrite it again. It gets
annyoing after about the 3rd rewrite. :-)

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



  reply	other threads:[~2001-07-26 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-26 13:09 Dual_IO (2) Gautier Write-only-address
2001-07-26 15:37 ` Ted Dennison [this message]
2001-07-28 18:42   ` Robert Dewar
2001-07-30 14:42     ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox