From: weasel Date: Fri, 26 Aug 2005 22:32:40 +0000 (+0000) Subject: Move logging functions further up X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=29103470e4470c002d5e523c29c1407efd033801;p=pgp-tools.git Move logging functions further up git-svn-id: svn://svn.debian.org/pgp-tools/trunk@237 b513b33f-fedd-0310-b452-c3deb5f4c849 --- diff --git a/caff/caff b/caff/caff index 97b0aa2..3520175 100755 --- a/caff/caff +++ b/caff/caff @@ -283,6 +283,30 @@ my $REVISION = '$Rev$'; my ($REVISION_NUMER) = $REVISION =~ /(\d+)/; my $VERSION = "0.0.0.$REVISION_NUMER"; + + +sub notice($) { + my ($line) = @_; + print "[NOTICE] $line\n"; +}; +sub info($) { + my ($line) = @_; + print "[INFO] $line\n"; +}; +sub debug($) { + my ($line) = @_; + #print "[DEBUG] $line\n"; +}; +sub trace($) { + my ($line) = @_; + #print "[trace] $line\n"; +}; +sub trace2($) { + my ($line) = @_; + #print "[trace2] $line\n"; +}; + + sub generate_config() { die "Error: \$LOGNAME is not set.\n" unless $ENV{LOGNAME}; my $gecos = (getpwnam($ENV{LOGNAME}))[6]; @@ -385,27 +409,6 @@ Regards, EOM }; -sub notice($) { - my ($line) = @_; - print "[NOTICE] $line\n"; -}; -sub info($) { - my ($line) = @_; - print "[INFO] $line\n"; -}; -sub debug($) { - my ($line) = @_; - #print "[DEBUG] $line\n"; -}; -sub trace($) { - my ($line) = @_; - #print "[trace] $line\n"; -}; -sub trace2($) { - my ($line) = @_; - #print "[trace2] $line\n"; -}; - sub make_gpg_fds() { my %fds = ( stdin => IO::Handle->new(),