bluto

Release package and announcement generator
Info | Log | Files | Refs | README | LICENSE

Log.pm (502B)


      1 package Bluto::Log;
      2 
      3 use Exporter qw/import/;
      4 our @EXPORT = qw/error info debug warn trace/;
      5 our $VERSION = 0.0.1;
      6 
      7 our $fh = STDERR;
      8 
      9 sub error($) {
     10 	print $fh "\e[0;91m" . shift . "\e[0m\n";
     11 }
     12 
     13 sub warn($) {
     14 	print $fh "\e[0;93m" . shift . "\e[0m\n";
     15 }
     16 
     17 sub debug($) {
     18 	print $fh "\e[0;90m" . shift . "\e[0m\n";
     19 }
     20 
     21 sub info($) {
     22 	print $fh "\e[0;92m" . shift . "\e[0m\n";
     23 }
     24 
     25 sub debug($) {
     26 	print $fh "\e[0;94m" . shift . "\e[0m\n";
     27 }
     28 
     29 sub trace($) {
     30 	print $fh "\e[0;90m" . shift . "\e[0m\n";
     31 }
     32 
     33 1;