W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

Request for feature: Logger.sync()

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Tue, 12 Nov 1996 12:03:54 +0100 (MET)
Message-Id: <199611121103.MAA20955@www43.inria.fr>
To: Alexandre Rafalovitch <alex@access.com.au>
Cc: www-jigsaw@w3.org
Alexandre Rafalovitch writes:
 > Hi,
 > I was looking at the Logger class with the buffering Logger in mind and I
 > realized, that there is one function missing that would be nice to have and
 > easy to implement.
 > This function is Logger.sync() (or flush()). This basically would flash the
 > log buffer if any on the disk.
 > That would be useful for debugging without having to change buffer size to
 > 0 and back.

Correct, BTW if you set the bufsize to 0, this will only affect the
currently running Jigsaw process, restarting it will "forget" that
change (if you're interested in the fix let me know).

How about:



 * Sync any pending state of the logger back to disk.

    public abstract void sync();

Which could be implemented by the ComonLogger

I would rather favor one single call, since you don't know wether a
logger instance uses different streams to report log entries, errors
and traces.

 > If flush function was present, I could create a log checkpoint resource
 > very easily. Or maybe a resource that can flush the buffer every minute
 > whether it is full or not (I can see some problems with keeping that
 > resource from being purged though.. ).

This checkpoint resource is in my todo list, it should also (config
attributes) checkpoint the global jigsaw state every N seconds (so
that we use only one thread for all the checkpointing)

It's so easy to write that I'll write it today :-)

Received on Tuesday, 12 November 1996 06:04:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:21 UTC