Projet

Général

Profil

Révision 7fdf0482

ID7fdf0482fa50e2f64549df446e41e9cf5d94f554

Ajouté par Antoine Beaupré il y a plus de 13 ans

fix debug printing

Voir les différences:

plugins/relayd/relayd
56 56
my $content = join("", <$conf>);
57 57
while ( $content =~ /table\s*<([^>]+)>\s*{([^}]+)}/g) {
58 58
        my $hosts = $2;
59
        print "table: $1, " if defined $Munin::Plugin::DEBUG;
59
        print "table: $1, " if $Munin::Plugin::DEBUG;
60 60
        $hosts =~ s/#.*$//mg; # comments
61 61
        $hosts =~ s/^\s+//mg; # trim spaces before lines
62
        print "hosts: $hosts\n" if defined $Munin::Plugin::DEBUG;
62
        print "hosts: $hosts\n" if $Munin::Plugin::DEBUG;
63 63
        push @hosts , split /\s+/, $hosts;
64 64
}
65 65

  
......
143 143
                open(my $status, "relayctl show summary|") or die "can't open relayctl: $!";
144 144
                while (<$status>) {
145 145
                        if (/([\w\.]+)\s+(\d+\.\d+)%/) {
146
                                print "found spare value: $2 for $1\n" if defined $Munin::Plugin::DEBUG;
146
                                print "found spare value: $2 for $1\n" if $Munin::Plugin::DEBUG;
147 147
                                $avail{$1} = $2 unless defined($avail{$1});
148 148
                        }
149 149
                }

Formats disponibles : Unified diff