1 |
package Torus::Logger; |
## ------------------------------------------------------------------------ |
2 |
|
## $Id$ |
3 |
use strict; |
## ------------------------------------------------------------------------ |
4 |
use warnings; |
## $Log$ |
5 |
|
## Revision 1.2 2003/01/19 03:35:26 joko |
6 |
|
## + added cvs-header |
7 |
|
## |
8 |
|
## ------------------------------------------------------------------------ |
9 |
|
|
10 |
|
|
11 |
|
package Torus::Logger; |
12 |
|
|
13 |
|
use strict; |
14 |
|
use warnings; |
15 |
|
|
16 |
#require "$basepath/etc/log/Config.pm"; |
#require "$basepath/etc/log/Config.pm"; |
17 |
#BEGIN { |
#BEGIN { |
18 |
use FindBin qw($Bin); |
use FindBin qw($Bin); |
19 |
#require "$Bin/use_libs.pl"; |
#require "$Bin/use_libs.pl"; |
20 |
#} |
#} |
21 |
|
|
22 |
|
|
23 |
use Log::Dispatch::Configurator::Hardwired; |
use Log::Dispatch::Configurator::Hardwired; |
24 |
use Log::Dispatch::Config; |
use Log::Dispatch::Config; |
25 |
|
|
26 |
my $bool_quiet = grep /--quiet/, @ARGV; |
my $bool_quiet = grep /--quiet/, @ARGV; |
27 |
my $bool_debug = grep /--debug/, @ARGV; |
my $bool_debug = grep /--debug/, @ARGV; |
28 |
my $bool_verbose = grep /--verbose/, @ARGV; |
my $bool_verbose = grep /--verbose/, @ARGV; |
29 |
configureLogDispatcher( { quiet => $bool_quiet, debug => $bool_debug, verbose => $bool_verbose } ); |
configureLogDispatcher( { quiet => $bool_quiet, debug => $bool_debug, verbose => $bool_verbose } ); |
30 |
|
|
31 |
sub configureLogDispatcher { |
sub configureLogDispatcher { |
32 |
my $args = shift; |
my $args = shift; |
33 |
my $logHandlerMeta = Log::Dispatch::Configurator::Hardwired->new(); |
my $logHandlerMeta = Log::Dispatch::Configurator::Hardwired->new(); |
50 |
|
|
51 |
Log::Dispatch::Config->configure($logHandlerMeta); |
Log::Dispatch::Config->configure($logHandlerMeta); |
52 |
} |
} |
53 |
|
|
54 |
1; |
1; |