X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=blobdiff_plain;f=bin%2Ffeedlog.pl;h=bbfd8142fd60adb31bfa3e75831fb11d3a2f542c;hb=23ab67a099e32a9ee8c0700fe46bc43680a60721;hpb=dfc2b81c37c38c2b7bcc8afeead0ec927845b90f diff --git a/bin/feedlog.pl b/bin/feedlog.pl index 7c64cab..bbfd814 100755 --- a/bin/feedlog.pl +++ b/bin/feedlog.pl @@ -69,14 +69,15 @@ sub PrepareDB { ################################# Main program ################################# ### read commandline options -my ($OptDebug,$OptQuiet); +my ($OptDebug,$OptQuiet,$OptConfFile); GetOptions ('d|debug!' => \$OptDebug, 'q|test!' => \$OptQuiet, + 'conffile=s' => \$OptConfFile, 'h|help' => \&ShowPOD, 'V|version' => \&ShowVersion) or exit 1; ### read configuration -my %Conf = %{ReadConfig('')}; +my %Conf = %{ReadConfig($OptConfFile)}; ### init syslog openlog($0, 'nofatal,pid', LOG_NEWS); @@ -130,7 +131,7 @@ while (<>) { }; }; $DBQuery->finish; - + warn sprintf("-----\nDay: %s\nDate: %s\nMID: %s\nTS: %s\nToken: %s\n". "Size: %s\nPeer: %s\nPath: %s\nNewsgroups: %s\nHeaders: %s\n", $Day, $Date, $Mid, $Timestamp, $Token, $Size, $Peer, $Path, @@ -152,7 +153,7 @@ feedlog - log data from an INN feed to a database =head1 SYNOPSIS -B [B<-Vhdq>] +B [B<-Vhdq>] [--conffile I] =head1 REQUIREMENTS @@ -198,6 +199,10 @@ find that information most probably in your B F file. Suppress logging to syslog. +=item B<--conffile> I + +Load configuration from I instead of F. + =back =head1 INSTALLATION