Lines 54-67
BEGIN {
Link Here
|
54 |
Log::Log4perl->init_once($conf); |
54 |
Log::Log4perl->init_once($conf); |
55 |
} |
55 |
} |
56 |
|
56 |
|
57 |
sub get { |
57 |
=head2 get |
58 |
my ( $class, $category, $interface ) = @_; |
|
|
59 |
|
58 |
|
60 |
croak("No category passed in!") unless $category; |
59 |
Returns a log4perl object. |
|
|
60 |
Category and interface parameter are optional. |
61 |
Normally, the category should follow the current package and the interface |
62 |
should be set correctly via C4::Context. |
61 |
|
63 |
|
62 |
$interface ||= C4::Context->interface(); |
64 |
=cut |
63 |
|
65 |
|
64 |
return Log::Log4perl->get_logger("$interface.$category"); |
66 |
sub get { |
|
|
67 |
my ( $class, $category, $interface ) = @_; |
68 |
$interface ||= C4::Context->interface(); |
69 |
$category = caller if !$category; |
70 |
return Log::Log4perl->get_logger( $interface. '.'. $category ); |
65 |
} |
71 |
} |
66 |
|
72 |
|
67 |
=head1 AUTHOR |
73 |
=head1 AUTHOR |
68 |
- |
|
|