From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8a3c1965bd416ce9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-26 08:37:22 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: Subject: Re: Dual_IO (2) Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Thu, 26 Jul 2001 11:37:20 EDT Organization: http://www.newsranger.com Date: Thu, 26 Jul 2001 15:37:20 GMT Xref: archiver1.google.com comp.lang.ada:10600 Date: 2001-07-26T15:37:20+00:00 List-Id: In article , 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