Log-Shiras
view release on metacpan or search on metacpan
examples/log_shiras_switchboard.pl view on Meta::CPAN
#!perl
use Modern::Perl;
use lib 'lib', '../lib',;
use Log::Shiras::Unhide qw( :debug :InternalSwitchboarD );# ;#
use Log::Shiras::Switchboard;
###InternalSwitchboarD use Log::Shiras::Report::Stdout;
$| = 1;
###LogSD warn "lets get ready to rumble...";
my $operator = Log::Shiras::Switchboard->get_operator(
name_space_bounds =>{
main =>{
UNBLOCK =>{
# UNBLOCKing the quiet, loud, and run reports (destinations)
# at the 'main' caller name_space and deeper
quiet => 'warn',
loud => 'info',
run => 'trace',
},
},
Log =>{
Shiras =>{
###InternalSwitchboarD Switchboard =>{#<-- Internal reporting enabled here
###InternalSwitchboarD get_operator =>{
###InternalSwitchboarD UNBLOCK =>{
###InternalSwitchboarD # UNBLOCKing log_file
###InternalSwitchboarD # at Log::Shiras::Switchboard::get_operator
###InternalSwitchboarD # (self reporting)
###InternalSwitchboarD log_file => 'info',
###InternalSwitchboarD },
###InternalSwitchboarD },
###InternalSwitchboarD master_talk =>{
###InternalSwitchboarD _buffer_decision =>{
###InternalSwitchboarD UNBLOCK =>{
###InternalSwitchboarD # UNBLOCKing log_file
###InternalSwitchboarD # at Log::Shiras::Switchboard::master_talk::_buffer_decision
###InternalSwitchboarD # (self reporting)
###InternalSwitchboarD log_file => 'trace',
###InternalSwitchboarD },
###InternalSwitchboarD },
###InternalSwitchboarD },
###InternalSwitchboarD send_buffer_to_output =>{
###InternalSwitchboarD UNBLOCK =>{
###InternalSwitchboarD # UNBLOCKing log_file
###InternalSwitchboarD # at Log::Shiras::Switchboard::_flush_buffer
###InternalSwitchboarD # (self reporting)
###InternalSwitchboarD log_file => 'info',
###InternalSwitchboarD },
###InternalSwitchboarD },
###InternalSwitchboarD },#<-- Internal reporting enabled through here
},
},
},
reports =>{
quiet =>[
Print::Wisper->new,
],
loud =>[
{
package => 'Print::Excited',
add_methods =>{
add_line => sub{
shift;
( run in 1.194 second using v1.01-cache-2.11-cpan-5a3173703d6 )