🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Aidan Cully Tue, 27 Oct 1998 00:00
Diagnostic messages from within a perl filter?
#32570
Author: Aidan Cully
Date: Tue, 27 Oct 1998 00:00
14 lines
1059 bytes
I'm just about finished rewriting the News Gizmo as an nnprd perl filter,
but I don't know how to report syntax errors in the config-file in the
context of a perl filter.  What's the best way to do this inside of
nnrpd?  I've heard that perl has a syslog function, but it also seems to
be a fair bit unreliable (didn't controlchan have trouble with it?), so
what should I do?

--aidan
-- 
Aidan Cully       "Umm..  Could you call back?  My house is on fire."
Panix Staff          --Tom Waits
aidan@panix.com

Re: Diagnostic messages from within a perl filter?
#32596
Author: Jeremy
Date: Wed, 28 Oct 1998 00:00
24 lines
1618 bytes
Aidan Cully <aidan@panix.com> wrote:

> I'm just about finished rewriting the News Gizmo as an nnprd perl filter,
> but I don't know how to report syntax errors in the config-file in the
> context of a perl filter.  What's the best way to do this inside of
> nnrpd?  I've heard that perl has a syslog function, but it also seems to
> be a fair bit unreliable (didn't controlchan have trouble with it?), so
> what should I do?

The syslog callback in bleeding-edge INN is in innd, not nnrpd.

When I tried using Sys::Syslog from the embedded perl, it crashed
horribly.  But that also was in innd, not nnrpd.  The problems it
has are with being portable, apparently.

Fluffy's syslog module attempts to solve those; that might be the
best one to try for what you want.

-- 
Jeremy | jeremy@exit109.com
"The sky would not fall if an American President spoke the truth."
                                   --Ronald Reagan

Re: Diagnostic messages from within a perl filter?
#32677
Author: Jim Dutton
Date: Mon, 02 Nov 1998 00:00
18 lines
1593 bytes
In article <7137ad$3nj@news1.panix.com>,
	aidan@panix.com (Aidan Cully) writes:
> I'm just about finished rewriting the News Gizmo as an nnprd perl filter,
> but I don't know how to report syntax errors in the config-file in the
> context of a perl filter.  What's the best way to do this inside of
> nnrpd?  I've heard that perl has a syslog function, but it also seems to
> be a fair bit unreliable (didn't controlchan have trouble with it?), so
> what should I do?

You can always use the SYSLOG -> news.notice functionality:

  $logger = "/usr/bin/logger -i -p news.notice";

and then call "$logger" with your messages (making sure your wrap things
in quotes). This will add a line to news.notice. (you may have to change
the path for your "logger")

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads