[news.software.b] C News log file

moraes@ai.toronto.edu (Mark Moraes) (06/28/89)

(Some info for those who haven't seen C News log files and are
speculating about it)

C News uses one line for each message. Most lines are close to 80
characters long, and seem to contain just enough information. An
extract from our log file:

Jun 27 03:36:31.200 smoke.brl.mil - <32694@apple.Apple.COM> duplicate
Jun 27 03:41:18.700 vmb.brl.mil - <832@helios.toronto.edu> duplicate
Jun 27 03:50:48.140 utgpu + <648@dptcdc.toronto.datapoint.com> utstat me
Jun 27 03:50:50.560 utgpu + <1305@garcon.cso.uiuc.edu> utstat dptcdc me qucis mailrus rutgers
Jun 27 03:50:51.980 utgpu + <27387@watmath.waterloo.edu> utstat me

+ or - indicates accepted or rejected, duplicate means just that, the
list of host names after the message id for a + articles indicates the
sites to which it was queued for onward transmission.

Adding more information is probably not hard - just a question of
printf() for log info or fprintf() for errlog info in relaynews. Dig
out the trusty old editor, edit the C code, and recompile.

In article <4657@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
> I want to be able to look in the log file and see:
>
>	Each message.

Implied by the line in the log file.

>	Where it came from.

Yep. That's there. Also the date and time, which is handy for
determining news flow and speed.

>	What newsgroups it was in.

Nope.

In the history file - do a lookup by message id. (What, you don't have
cut and paste ? :-)

>	What the subject was.

Nope. Not likely to be added, either, I suspect.

As far as the news transport is concerned, the Subject of an article
is entirely unimportant - I think it is best left that way. transport
should not concern itself with contents of the news any more than it
can help it.

>	Whether it was duplicate.

Yep. That's there.

>	Where it was forwarded to.

Yep. That too is there.

>	And any errors that occurred.

Not in log.

That's what the errlog is for. It's usually empty, anyway. (:-)

henry@utzoo.uucp (Henry Spencer) (06/28/89)

In article <89Jun27.222123edt.11708@neat.ai.toronto.edu> moraes@ai.toronto.edu (Mark Moraes) writes:
>As far as the news transport is concerned, the Subject of an article
>is entirely unimportant - I think it is best left that way. transport
>should not concern itself with contents of the news any more than it
>can help it.

In fact, those who have looked at the code have probably noticed that
C News relaynews doesn't even bother to remember any headers it doesn't
need for its own work.  And the ones it does need, it doesn't parse any
more than it has to.  (Which is why expiry dates go into history as human-
readable dates until the first time expire gets its hands on them.)
-- 
NASA is to spaceflight as the  |     Henry Spencer at U of Toronto Zoology
US government is to freedom.   | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

bill@twwells.com (T. William Wells) (06/30/89)

In article <89Jun27.222123edt.11708@neat.ai.toronto.edu> moraes@ai.toronto.edu (Mark Moraes) writes:
: >     What newsgroups it was in.
:
: Nope.
:
: In the history file - do a lookup by message id. (What, you don't have
: cut and paste ? :-)

Actually, cut, grep (or whatever your favorite selection tool is),
sort, and join are the right tools for this.

Cut out the fields you want from the two files, grep out lines that
are not of interest, sort by message id, and join on the message id.
The result is a file that contains the interesting fields from both
the log and history files. And you don't have to keep it around after
you've got your stats.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill@twwells.com