MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Mon, Mar 10, 2014 10:29 pm

Debug output for calendar plugin for Blosxom

I've been using Blosxom for this blog and version 0+6i of the calendar plugin for Blosxom written by Todd Larason whose website seems to no longer be extant, though it is available through the Internet Archive's WayBack Machine here. The last time the Internet Archive archived the site was on March 25, 2010. The plugin can be downloaded from this site at Calendar Plugin for Blosxom.

The plugin has been contributing a lot of entries in the site's error log that appear to be related to normal behavior for the plugin. I've been ignoring them, since the plugin has been working fine and the entries seem to be more informatonal in nature than reflective of a problem with the plugin. E.g., I see a lot of entries similar to the following:

[Sun Mar 09 23:59:19 2014] [error] [client] calendar debug 1: start() called, enabled
[Sun Mar 09 23:59:20 2014] [error] [client] calendar debug 1: filter() called
[Sun Mar 09 23:59:20 2014] [error] [client] calendar debug 1: Using cached state
[Sun Mar 09 23:59:20 2014] [error] [client] calendar debug 1: head() called
[Sun Mar 09 23:59:20 2014] [error] [client] calendar debug 1: head() done, length($month_calendar, $year_calendar, $calendar) = 3947 1212 5229

I finally decided I should stop the production of those entries, though, so I could more readily see log entries that are significant. So I looked at the Perl code for the plugin. On line 30, I see the following:

$debug_level    = 1 unless defined $debug_level;

The debug surboutine is on lines 49 through 56 and is as follows:

sub debug {
    my ($level, @msg) = @_;

    if ($debug_level >= $level) {
        print STDERR "$package debug $level: @msg\n";

On line 517, I see the following comment.

C<$debug_level> can be set to a value between 0 and 5; 0 will output
no debug information, while 5 will be very verbose.  The default is 1,
and should be changed after you've verified the plugin is working

Since the plugin has been working for a long time and I don't need to see the debugging information, I set the value for debug_level on line 30 to zero instead of one.

$debug_level    = 0 unless defined $debug_level;

That has stopped the insertion of the calendar plugin entries in the Apache error log file with no effect on the calendar's functionality.

[/network/web/blogging/blosxom] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo