HP3000-L Archives

August 1997, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Steve Dirickson b894 WestWin <[log in to unmask]>
Reply To:
Steve Dirickson b894 WestWin <[log in to unmask]>
Date:
Fri, 22 Aug 1997 17:47:00 P
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
<<Evan takes the bait:
> Gavin Scott <[log in to unmask]> wrote:
> >Circular files, now *there's* a useless feature.
>
> Not at all; for example, they're wonderful for event logging when you
know
> that you only want to keep track of the last "n" events.

The useless part of Circular File is that, as far as I know, there's no
way to read the contents of one while it's open for writing, which means
that you have to shutdown whatever is logging to it in order to see what
has been logged.>>


You don't need to shut down the logger; just have the logger close the
file after each write. Which, if the logging is considered critical, is
not all that expensive, since you're probably already forcing the logged
info to be flushed to disk anyway. So the logging sequence becomes
open/write/close, and, unless the file is actively being written to most
of the time, allows the reader to take a look between writes. Of course,
the logger has to be able to handle the case where it can't open the file
for immediate writing because it's opened by a reader, and likewise for
an attempted read open while a write is in progress. Which is much more
painful than seems really necessary.

Are they useful? Yes. Would they be tremendously more useful if they
could be opened by both readers and a writer? Absolutely. I'd love to
know why "one writer, multiple readers" is allowed for message files but
not for circular files.

Steve

ATOM RSS1 RSS2