GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Log::Dispatch::Colorful(3) User Contributed Perl Documentation Log::Dispatch::Colorful(3)

Log::Dispatch::Colorful - Object for logging to screen.

  use Log::Dispatch::Colorful;

  my $screen = Log::Dispatch::Colorful->new(
      name      => 'screen',
      min_level => 'debug',
      stderr    => 1,
      format    => '[%d] [%p] %m at %F line %L%n',
      color     => {
          info  => { text => 'green', },
          debug => {
              text       => 'red',
              background => 'white',
          },
          error => {
              text       => 'yellow',
              background => 'red',
          },
      }
  );

  $screen->log( level => 'error', message => "look at that rainbow!\n" );

  # dump reference variants!
  my $data = {
      foo => 'bar',
  };
  $screen->log( level => 'debug', message => $data );

Log::Dispatch::Colorful is provides an object for logging to the screen.

this module is rewrite Log::Dispatch method for Dumper. if you don't need Dumper, you think about using Log::Dispatch::Screen::Color.

This method takes a hash of parameters.

Sends a message if the level is greater than or equal to the object's minimum level. This method applies any message formatting callbacks that the object may have. (in Log::Dispatch::Output).

Sends a message to the appropriate output. Generally this shouldn't be called directly but should be called through the "log()" method (in Log::Dispatch::Output).

Daisuke Komatsu <vkg.taro@gmail.com>

Log::Dispatch, Log::Dispatch::Screen, Catalyst::Plugin::Log::Colorful

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2009-09-20 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.