NNTP Logging

The program's NNTP logging feature started life as a debugging aid for yours truly. I didn't understand the conversation that takes place between a news client and its NNTP server very well so I thought, Heck, why not write it all out to a text file so I can examine it at my leisure. It didn't take me long to realize that it could be a powerful debugging aid for everybody else also, and a good way to troubleshoot problems related to the differences between news servers.

NNTP logging is controlled by a setting in PineappleNews.ini. Eventually I'll get around to putting the setting in a dialog box somewhere but for now you must edit the file to change it. See the help topic PineappleNews.ini Reference for details. To turn logging on or off, look for this:

[Storage]
...
TransferLogging = None

TransferLogging can have one of three values: None, which means no logging will take place; ActionsOnly, which will log only NNTP commands and their responses; or ActionsAndTransfers, which logs every single line sent and received. (If you prefer you can use the values 0, 1, or 2, which do the same three things. But the next time PineappleNews writes the file it will change the integer you typed back into a descriptive text string.)

If logging is turned on and you initiate a transfer Pineapple News will start writing to the following file:

/boot/home/PineappleData/news/NNTP.log

The file may be somewhere else if you have changed your data directory to something other than the default.

Following is a sample conversation between Pineapple News and the NNTP server at Newsguy News. The program asks for the current article range in the newsgroup alt.thanatos, discovers that there is one article it doesn't have, and retrieves it.

2000/08/16 02:46:47 Looking up IP address for DNS name enews.newsguy.com ...
2000/08/16 02:46:48 Connecting to server Newsguy News ...
2000/08/16 02:46:49 R: 200 enews4.newsguy.com InterNetNews NNRP server (posting ok).
2000/08/16 02:46:49 Logging in ...
2000/08/16 02:46:49 S: AUTHINFO USER stickles
2000/08/16 02:46:49 R: 381 PASS required
2000/08/16 02:46:49 S: AUTHINFO PASS timmy_loves_chocolate
2000/08/16 02:46:50 R: 281 Ok
2000/08/16 02:46:50 Downloading new messages from alt.thanatos ...
      Saved index range: 9764 to 9840
2000/08/16 02:46:50 S: GROUP alt.thanatos
2000/08/16 02:46:50 R: 211 68 9764 9841 alt.thanatos
2000/08/16 02:46:50 GROUP command index range: 9764 to 9841, 68 messages
      Indexes to be downloaded: 9841 to 9841
2000/08/16 02:46:50 S: ARTICLE 9841
2000/08/16 02:46:52 R: 220 9841 article
2000/08/16 02:46:52 R: Path: spln!lex!extra.newsguy.com!newsp.newsguy.com!enews2
2000/08/16 02:46:52 R: From: Johnny Favorite (it means "Wrote His Own Newsreader")
2000/08/16 02:46:52 R: Newsgroups: alt.thanatos
2000/08/16 02:46:52 R: Subject: Re: the nationals

[... mucho lines deleted ...]

2000/08/16 02:46:52 R: Pineapple News reply off of!" But he wasn't. No, that honor goes
2000/08/16 02:46:52 R: Foster, whose name will now go down in the record books.
2000/08/16 02:46:52 R: .
2000/08/16 02:46:52 Disconnecting ...
2000/08/16 02:46:52 S: QUIT
2000/08/16 02:46:52 R: 205
2000/08/16 02:46:52 Total connect time: 4 seconds

The stuff at the far left edge is the date and time. Lines that have an S: are ones Pineapple News Sent to the far end and the R: lines are ones the program Received from the server.

The log setting during this transaction was ActionsAndTransfers, so we see the lines that make up the article file that was received. If the setting was ActionsOnly then you'd see nothing but commands (GROUP, QUIT, etc.) and the responses the server sent back. ActionsOnly makes for a smaller file that's easier to scan through but depending on the type of problem encountered you might need ActionsAndTransfers to capture every last line.

Lines without an S: or R: are just little notes about what the program thinks should be happening at this point. They look redundant but that's only because in this particular conversation everything is running smoothly. If the program were to announce "Logging in ..." and the news server sends back "What?" or something similar, you'd know you've got a problem.

The NNTP log can get huge very quickly so you shouldn't normally leave it turned on. I do, but that's because I'm a very sick individual with an unhealthy obsession with my own creation. And since I still notice anomalous situations every now and then it's nice to be able to "go to the videotape" to see what went wrong.

If you run into a situation where Pineapple News says it can't do something because it got an error code from your news server and you're trying to get me or somebody else to help you figure out what the heck is going on, a snippet from NNTP.log that shows the conversation in question would be invaluable. Keep that in mind when asking for help.


Help Index