… | |
… | |
49 | will be logged, unless you set C<PERL_ANYEVENT_VERBOSE> to a higher number |
49 | will be logged, unless you set C<PERL_ANYEVENT_VERBOSE> to a higher number |
50 | before starting your program, or change the logging level at runtime with |
50 | before starting your program, or change the logging level at runtime with |
51 | something like: |
51 | something like: |
52 | |
52 | |
53 | use AnyEvent::Log; |
53 | use AnyEvent::Log; |
54 | AnyEvent::Log::FILTER->level ("info"); |
54 | $AnyEvent::Log::FILTER->level ("info"); |
55 | |
55 | |
56 | The design goal behind this module was to keep it simple (and small), |
56 | The design goal behind this module was to keep it simple (and small), |
57 | but make it powerful enough to be potentially useful for any module, and |
57 | but make it powerful enough to be potentially useful for any module, and |
58 | extensive enough for the most common tasks, such as logging to multiple |
58 | extensive enough for the most common tasks, such as logging to multiple |
59 | targets, or being able to log into a database. |
59 | targets, or being able to log into a database. |
|
|
60 | |
|
|
61 | The module is also usable before AnyEvent itself is initialised, in which |
|
|
62 | case some of the functionality might be reduced. |
60 | |
63 | |
61 | The amount of documentation might indicate otherwise, but the runtime part |
64 | The amount of documentation might indicate otherwise, but the runtime part |
62 | of the module is still just below 300 lines of code. |
65 | of the module is still just below 300 lines of code. |
63 | |
66 | |
64 | =head1 LOGGING LEVELS |
67 | =head1 LOGGING LEVELS |
… | |
… | |
513 | } |
516 | } |
514 | |
517 | |
515 | @$_ = ($_->[0], (1 << 10) - 1 - 1) |
518 | @$_ = ($_->[0], (1 << 10) - 1 - 1) |
516 | for $LOG, $FILTER, $COLLECT; |
519 | for $LOG, $FILTER, $COLLECT; |
517 | |
520 | |
518 | $LOG->slaves; |
521 | #$LOG->slaves; |
519 | $LOG->title ('$AnyEvent::Log::LOG'); |
522 | $LOG->title ('$AnyEvent::Log::LOG'); |
520 | $LOG->log_to_warn; |
523 | $LOG->log_to_warn; |
521 | |
524 | |
522 | $FILTER->slaves ($LOG); |
525 | $FILTER->slaves ($LOG); |
523 | $FILTER->title ('$AnyEvent::Log::FILTER'); |
526 | $FILTER->title ('$AnyEvent::Log::FILTER'); |