App-Regather
    
    
  
  
  
view release on metacpan or search on metacpan
lib/App/Regather/Logg.pm view on Meta::CPAN
use strict;
use warnings;
use diagnostics;
use Sys::Syslog qw(:standard :macros);
use Mail::Send;
use Sys::Hostname;
use Data::Printer caller_info => 1, class => { expand => 2 };
# https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg
use constant dpc => { info    => 'ansi113',
		      err     => 'bold ansi255 on_ansi196',
		      debug   => 'ansi195', #grey18', #bright_yellow',
#		      warning => 'bold ansi237 on_ansi214', #bright_yellow',
		      warning => 'ansi214', #bright_yellow',
		    };
=pod
=encoding UTF-8
=head1 NAME
App::Regather::Logg - logging class
lib/App/Regather/Logg.pm view on Meta::CPAN
=item colors =E<gt> 1 | 0
wheather to use terminal colors, default is: 0
if set, then priorities are colored this way:
=over 4
info    => 'ansi113'
err     => 'bold ansi255 on_ansi196'
debug   => 'ansi195'
warning => 'bold ansi237 on_ansi214'
=back
for reference look at L<Term::ANSIColor>
=item ts_fmt =E<gt> 'strftime(3) format string'
timestamp format string, default is: "%a %F %T %Z (%z)"
=back
( run in 0.273 second using v1.01-cache-2.11-cpan-5dc5da66d9d )