How to read/poll disk_log wrap-logs?

Adam Aquilon aa@REDACTED
Tue Dec 12 11:15:08 CET 2000

Hi all!

I'm feeling pretty stupid right now and I would appreciate anyone
helping me out.

I've been trying to setup a small reader for a log created as
a 'disk_log' internal format wrap log (more than one wrap file).

The behaviour I'm after is a reader that will can run in a separate VM
from the process(es) writing to the wrap log. In other words, I don't
want any other communication between the reader and the writers than
the log files themselves. 

The reader should open the wrap log in 'read_only' mode and start
doing sequential reads of the log data from the top. When it hits the
end of the (circular) log, it should start polling for new data.

I've tried to create this behaviour using both the disk_log:chunk/2,3
functions as well as the separate 'wrap_log_reader' module, but none
of those mechanisms seem to work. When these read functions return
eof, there seems to be now way of making them follow the "write
pointer" used by the writing VM, back to the first log file (or in
some cases even to the next file in the log).

I'm sure *someone* must have written the kind of reader I'm looking
for, or otherwise managed to manuever disk_log or wrap_log_reader into 
doing what I want, so please help me out.


Adam Aquilon                  CellPoint Systems AB
Office: +46  8 6332729        Phone: +46 8 6332700
Mobile: +46 70 7294121        Fax:   +46 8 358790
Email: aa@REDACTED           Kronoborgsgränd 7,         S-164 46 Kista, SWEDEN

More information about the erlang-questions mailing list