Article View: news.software.nntp
Article #69913Re: Why filter_innd.pl don't write to syslog
From: Russ Allbery
Date: Sat, 18 Sep 2004 18:55
Date: Sat, 18 Sep 2004 18:55
22 lines
1934 bytes
1934 bytes
Darth Maul <zinin@comtv.ru> writes:
> This is fragment of filter_innd.pl, sub filter_art:
> sub filter_art {
> openlog("filter_innd", "pid", "news");
> syslog("notice", "testnax");
> closelog();
> This code don't write to news.notice, then anybody post any article.
> But if this code run apart as independed proccess from user "news", it
> will write to news.notice. Why ? How to write to syslog from
> filter_innd.pl ?
I'm not entirely sure why this doesn't work, but in general you want to
just call INN::syslog() rather than using Sys::Syslog in an embedded
filter. innd already has syslog open, after all.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<87mzznz9th.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailReferences:
<cihiu3$2ind$1@news.comcor-tv.ru>Show Full Headers
Complete Article Headers
Message-ID: <87mzznz9th.fsf@windlord.stanford.edu> Subject: Re: Why filter_innd.pl don't write to syslog Date: Sat, 18 Sep 2004 11:55:06 -0700 From: Russ Allbery <rra@stanford.edu> References: <cihiu3$2ind$1@news.comcor-tv.ru> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 22 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1095533706 24578 171.64.19.147 (18 Sep 2004 X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:WOPTLYvnddaLKkKlLnIiG11HfhE=