Changeset 784 for server


Ignore:
Timestamp:
Aug 2, 2008, 5:25:38 PM (16 years ago)
Author:
quentin
Message:
Use explicit recipients for non-root log messages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/fedora/config/etc/syslog-ng/d_zroot.pl

    r783 r784  
    2121    $class ||= $ZCLASS;
    2222    $instance ||= 'root.'.hostname;
    23     # @recipients ||= @RECIPIENTS;
    24     open(ZWRITE, "|-", qw|/usr/bin/zwrite -d -n -O log -c|, $class, '-i', $instance, '-s', hostname, @RECIPIENTS) or die "Couldn't open zwrite";
     23    open(ZWRITE, "|-", qw|/usr/bin/zwrite -d -n -O log -c|, $class, '-i', $instance, '-s', hostname, @recipients) or die "Couldn't open zwrite";
    2524    print ZWRITE $message;
    2625    close(ZWRITE);
     
    5251    my (undef, $fingerprint, undef) = split(' ', $line, 3);
    5352    my (undef, undef, $comment) = split(' ', $key, 3);
    54     print "$fingerprint $comment";
     53    #print "$fingerprint $comment";
    5554    return ($fingerprint, $comment);
    5655}
     
    110109
    111110    foreach my $class (keys %toclass) {
    112         zwrite($toclass{$class}, $class);
     111        if ($class eq "scripts-auto") {
     112            zwrite($toclass{$class}, $class);
     113        } else {
     114            zwrite($toclass{$class}, $class, undef, @RECIPIENTS);
     115        }
    113116    }
    114117}
Note: See TracChangeset for help on using the changeset viewer.