diff options
author | Mystery Man <unknown@mandriva.org> | 2002-07-09 13:18:50 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2002-07-09 13:18:50 +0000 |
commit | b6c80998f798afb98c5ebb42441c25668b31c93e (patch) | |
tree | 0a40adbce78a1b7ddee1ba637215ca857ffcae19 /perl-install/log.pm | |
parent | a6a904a31e39b74144c53f0cc4086d496b70c09a (diff) | |
download | drakx-1_1_8_4mdk.tar drakx-1_1_8_4mdk.tar.gz drakx-1_1_8_4mdk.tar.bz2 drakx-1_1_8_4mdk.tar.xz drakx-1_1_8_4mdk.zip |
This commit was manufactured by cvs2svn to create tag 'V1_1_8_4mdk'.V1_1_8_4mdk
Diffstat (limited to 'perl-install/log.pm')
-rw-r--r-- | perl-install/log.pm | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/perl-install/log.pm b/perl-install/log.pm deleted file mode 100644 index 649ed30a0..000000000 --- a/perl-install/log.pm +++ /dev/null @@ -1,58 +0,0 @@ -package log; # $Id$ - -use diagnostics; -use strict; -use c; - - -#-##################################################################################### -#- Globals -#-##################################################################################### -my $logOpen = 0; -my $logDebugMessages = 0; - - -#-###################################################################################### -#- Functions -#-###################################################################################### -sub F() { *LOG } - -sub l { - $logOpen or openLog(); - if ($::isStandalone) { - c::syslog(c::LOG_WARNING(), join("", @_)); - } elsif ($::isInstall) { - print LOG "* ", @_, "\n"; - print LOG2 "* ", @_, "\n"; - } else { - print STDERR @_, "\n"; - } -} -sub ld { $logDebugMessages and &l } -sub w { &l } - -sub openLog(;$) { - if ($::isInstall) { - if ($_[0]) { #- useLocal - open LOG, "> $_[0]";# or die "no log possible :("; - } else { - open LOG, "> /dev/tty3";# or die "no log possible :("; - } - open LOG2, ">> /tmp/ddebug.log";# or die "no log possible :("; - select((select(LOG), $| = 1)[0]); - select((select(LOG2), $| = 1)[0]); - } - exists $ENV{DEBUG} and $logDebugMessages = 1; - $logOpen = 1; -} - -sub closeLog() { - if ($::isStandalone) { - c::closelog(); - } else { close LOG; close LOG2; } -} - -#-###################################################################################### -#- Wonderful perl :( -#-###################################################################################### -1; |