The program’s NNTP logging feature was originally created 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 decided it would be a good idea to write it out to a text file so I could examine it at my leisure. It didn’t take me long to realize that it could be a powerful debugging aid for others, and a good way to troubleshoot problems related to differences between news servers.
NNTP logging is controlled by a setting in an account’s init file. You can find it here, by replacing [yourname] with the login name you use for Mac OS X and [accountname] with the name of the account you want to enable logging for.
/Users/[yourname]/Library/PineappleData/News/Accounts/[accountname]/Data/Account.init
It’s a simple text file. Double-clicking its icon should open the file in your preferred text editor. Look for a section in the file like this:
[Account]
Identity = "EWFAUBYJFO"
Logging = 0
The “Logging” key can have one of three values: 0, which means no logging will take place; 1, which will log only NNTP commands and their responses; or 2, which logs every single line sent and received. Setting it to 1 is usually sufficient. The 2 setting tends to drown you in unnecessary data. The logging file can get huge very quickly, so you should turn it off as soon as possible. If logging is enabled and you initiate a transfer, Pineapple News will write data to the following file:
/Users/[yourname]/Library/PineappleData/News/Accounts/[accountname]/Data/TransferLog.txt
The file may be located somewhere else if you have changed your data directory to something other than the default.
Following is a conversation between Pineapple News and the NNTP server at Newsguy News. The program asks for the current article range in the newsgroup alt.internet.talk.haven, discovers that there are two new articles it doesn’t have, and retrieves them. The logging level was set at 1.
2005/07/14 14:00:47 Connecting to server enews.newsguy.com ...
2005/07/14 14:00:47 S: 200 news4.newsguy.com ready (posting ok).
2005/07/14 14:00:47 C: AUTHINFO USER smellytoes
2005/07/14 14:00:47 S: 381 PASS required
2005/07/14 14:00:47 C: AUTHINFO PASS xxxxxxxx
2005/07/14 14:00:48 S: 281 Ok
2005/07/14 14:00:48 C: GROUP alt.internet.talk.haven
2005/07/14 14:00:50 S: 211 155 4329 4486 alt.internet.talk.haven
2005/07/14 14:00:50 Previous (low/high/total): 4329 4484 153
2005/07/14 14:00:50 Current (low/high/total): 4329 4486 155
2005/07/14 14:00:50 C: ARTICLE 4485
2005/07/14 14:00:50 S: 220 4485
2005/07/14 14:00:50 C: ARTICLE 4486
2005/07/14 14:00:51 S: 220 4486
2005/07/14 14:00:51 C: QUIT
2005/07/14 14:00:51 S: 205
2005/07/14 14:00:51 Total session time: 4 seconds
Received: 2.69 KB sent: 113 bytes
Throughput: 716 bytes per second
The numbers at the left are the date and time. Lines that have an C: are ones Pineapple News sent to the news server. It stands for Client, which is the program’s role in the conversation. Lines that begin with S: are data received from the server.
Lines without a C: or S: are 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 “Connecting ...” and the news server sends back “What?” or something similar, you’d know you’ve got a problem.