summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-01-14 06:27:41 +0000
committerPeter Palfrader <peter@palfrader.org>2003-01-14 06:27:41 +0000
commit7a3bf2431b20ce0bfa7ec1cbc782975e687ef4d7 (patch)
tree5643d0bea4d9146942050adc334eed35f98b0933
parent1b5fed479a31e06829a714f7ac520b0f101642ff (diff)
Documenting new requirements
Reopen log on SIGHUP
-rw-r--r--Echolot/Log.pm17
-rw-r--r--NEWS2
-rw-r--r--README14
-rw-r--r--UPGRADE5
-rwxr-xr-xpingd5
-rwxr-xr-xtools/install-perl-modules2
6 files changed, 30 insertions, 15 deletions
diff --git a/Echolot/Log.pm b/Echolot/Log.pm
index 9eb7d9f..a91ac08 100644
--- a/Echolot/Log.pm
+++ b/Echolot/Log.pm
@@ -1,7 +1,7 @@
package Echolot::Log;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Log.pm,v 1.1 2003/01/14 05:26:14 weasel Exp $
+# $Id: Log.pm,v 1.2 2003/01/14 06:27:41 weasel Exp $
#
=pod
@@ -37,10 +37,8 @@ sub header_log(%) {
return $logstring;
};
-sub init(%) {
- my (%args) = @_;
-
- $LOG = Log::Dispatch->new( callbacks => \&header_log );
+sub reopen() {
+ $LOG->remove( 'file1' );
$LOG->add( Log::Dispatch::File->new(
name => 'file1',
min_level => 'debug',
@@ -49,9 +47,12 @@ sub init(%) {
));
};
-#sub log() {
-# return $LOG;
-#};
+sub init(%) {
+ my (%args) = @_;
+
+ $LOG = Log::Dispatch->new( callbacks => \&header_log );
+ reopen();
+};
sub debug($) {
$LOG->debug(@_);
diff --git a/NEWS b/NEWS
index e70743e..9d696e1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,6 @@
Changes in
* first go at sane loggin
- fixme: new requirements
fixme: make logging configureable
- fixme: reopen log on SIGHUP
Changes in version 2.0.8 - 2003-01-13
* Work around a bug that let pingd die in certain random cases when
diff --git a/README b/README
index 53702fb..b5c4aa2 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-$Id: README,v 1.37 2002/12/18 19:22:24 weasel Exp $
+$Id: README,v 1.38 2003/01/14 06:27:41 weasel Exp $
#####################################################################
## R E A D M E F O R E C H O L O T ###########################
#####################################################################
@@ -43,6 +43,8 @@ o HTML::Template
o GnuPG::Interface (0.33 or higher required)
o Data::Dumper (should be part of perl-base)
o Digest::MD5 (included in perl 5.8 or higher)
+o Log::Dispatch and
+ Log::Dispatch::File (tested with 1.79 and 2.01)
INITIAL SETUP
-------------
@@ -64,6 +66,16 @@ o If the required perl modules above are not yet installed on your
If this command reports errors, please verify that you are using perl
5.8 or higher and are connected to the Internet.
+ [Note: if you operating system already has packages with the required
+ libraries than those generally are preferred since they integrate better with
+ your system.
+
+ On Debian for instance the following command can be used to get
+ everything that is required:
+ # apt-get install liblog-dispatch-perl libgnupg-interface-perl
+ libhtml-template-perl
+ ]
+
o Create a new user named »pinger« (You can use a different user name if
you so desire. The remainder of this document assumes that Echolot has
been installed as user »pinger«).
diff --git a/UPGRADE b/UPGRADE
index ce79746..2f83b59 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -1,5 +1,5 @@
Upgrading checklist for Echolot
-$Id: UPGRADE,v 1.1 2002/12/18 18:35:53 weasel Exp $
+$Id: UPGRADE,v 1.2 2003/01/14 06:27:41 weasel Exp $
- Download the latest .tar.gz from <URL:http://www.palfrader.org/echolot/>.
- Verify the signature.
@@ -13,6 +13,9 @@ $Id: UPGRADE,v 1.1 2002/12/18 18:35:53 weasel Exp $
- Congratulations.
+Notes for upgrades from a version earlier than 2.0.9
+ - The Log::Dispatch perl module is now required.
+
Notes for upgrades from a version earlier than 2.0.6
- If you have specified thesaurusindexfile and/or indexfilebasename in your
Echolot configuration file, please remove the .html extension from that
diff --git a/pingd b/pingd
index 433a2ed..361d889 100755
--- a/pingd
+++ b/pingd
@@ -3,7 +3,7 @@
$| = 1;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: pingd,v 1.87 2003/01/14 05:25:34 weasel Exp $
+# $Id: pingd,v 1.88 2003/01/14 06:27:41 weasel Exp $
#
=pod
@@ -310,6 +310,7 @@ sub setSigHandlers() {
open (STDOUT, ">>output") or die ("Cannot open 'output' as STDOUT\n");
open (STDERR, ">&STDOUT") or die ("Cannot dup STDOUT as STDERR\n");
};
+ Echolot::Log::reopen();
};
$SIG{'INT'} = sub {
Echolot::Log::info("Got SIGINT. scheduling exit");
@@ -485,7 +486,7 @@ sub daemon_run($) {
Echolot::Globals::get()->{'storage'}->finish();
unlink (Echolot::Config::get()->{'pidfile'}) or
- cluck ("Cannot unlink pidfile ".Echolot::Config::get()->{'pidfile'});
+ Echolot::Log::warn ("Cannot unlink pidfile ".Echolot::Config::get()->{'pidfile'}.".");
};
sub send_sig($) {
diff --git a/tools/install-perl-modules b/tools/install-perl-modules
index 3848e8e..2565bad 100755
--- a/tools/install-perl-modules
+++ b/tools/install-perl-modules
@@ -6,7 +6,7 @@
use strict;
use CPAN;
-for my $mod (qw{Data::Dumper Digest::MD5 HTML::Template GnuPG::Interface}) {
+for my $mod (qw{Data::Dumper Digest::MD5 HTML::Template GnuPG::Interface Log::Dispatch}) {
my $obj = CPAN::Shell->expand('Module',$mod);
$obj->install();
};