mvnForum Homepage

Print at Jan 19, 2021 10:31:20 AM

Posted by popiel at Dec 25, 2003 6:51:40 AM
Re: Messy Logs
Tee_Beard wrote: 
XML offers the advantages of a simple database system (or even a more complex one, but we won't need it in this case), with the robustness of text.

Actually, XML doesn't offer the main advantage of a database system: random access to arbitrary records without reading (on average) half of the whole thing. But that's irrelevant...

Tee_Beard wrote: 
Now anyone can write their own tools to collate and rearrange chatlog information so that it looks nice.

They could do that already. The chat log is very easily parsed with newline separated records of one of two flavors: a datestamp, or an output line with a prefix timestamp. Very simple to parse with just a couple regular expressions, scanf patterns, or even fixed-width fields + overflow.

The issue is that we're missing data in the log. This could be rectified with a 'method' attribute in XML as Diamondblade suggests, or it could be rectified as easily (and much more concisely without reducing human readability) by sticking in [flagofficer]/[crew]/[broadcast]/[whatever] right after the timestamp, to make it look like this:

[09:18:01] [crew] Talek says, "This is getting silly."

Yes, you can't just use a stylesheet to format this prettily for your web browser... my gosh, we're up to a perl 1-liner. If you want to sort, collate, spindle, or mutilate the log, you can't use just a stylesheet anyway... and we're still at only a few lines of perl.

XML ain't no magic bullet.
Owner of Occam's Razors on Epsilon
Officer in the Roundhouse Rum Runners

Puzzle Pirates™ © 2001-2020 Grey Havens, LLC All Rights Reserved.   Terms · Privacy · Affiliates