Skip Menu |
 

This queue is for tickets about the Bot-BasicBot CPAN distribution.

Report information
The Basics
Id: 51804
Status: resolved
Priority: 0/
Queue: Bot-BasicBot

People
Owner: Nobody in particular
Requestors: MDOM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.81
Fixed in: (no value)



Subject: A warning is directly printed to stderr instead of using log()
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1258906880-6514-900"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 249
Download (untitled) / with headers
text/plain 249b
Hi Tom, i just started to implement a more elaborate loggin scheme in B:BB:P and was very happy to find a log function in B:BB. But there's still one spot where a warning is directly printed to stderr. The attached patch solves this. Cheers, Mario
Subject: basicbot_logging.diff
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1258906855-6514-899"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/octet-stream; name="basicbot_logging.diff"
Content-Disposition: inline; filename="basicbot_logging.diff"
Content-Transfer-Encoding: base64
Content-Length: 758
--- /Users/dom/perl5/lib/perl5/Bot/BasicBot.pm 2009-01-26 10:15:25.000000000 +0100 +++ BasicBot.pm 2009-11-22 17:10:44.000000000 +0100 @@ -597,9 +597,12 @@ my $who = ( $args->{channel} eq "msg" ) ? $args->{who} : $args->{channel}; unless ( $who && $body ) { - print STDERR "Can't PRIVMSG without target and body\n"; - print STDERR " called from ".([caller]->[0])." line ".([caller]->[2])."\n"; - print STDERR " who = '$who'\n body = '$body'\n"; + $self->log( "Can't PRIVMSG without target and body\n" + . " called from " + . ( [caller]->[0] ) + . " line " + . ( [caller]->[2] ) . "\n" + . " who = '$who'\n body = '$body'\n" ); return; }
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2359-1288783938-1873.51804-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 34
I have applied your patch. Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.