среда, 2 сентября 2015 г.

My universal debugger on perl


use FindBin '$RealBin';
use Log::Log4perl qw(:easy);
my $log_file = $RealBin . "/show_image.log";
#Init logging
Log::Log4perl->easy_init(
{ level => $DEBUG,
file => ":utf8>>$log_file",
layout => '%d %p> %m%n'
}
);
my $msg = qq{image name is $picture_directory/$id.jpg};
INFO($msg);
view raw debug.pl hosted with ❤ by GitHub
Simply put output to log file. Voilà.

Комментариев нет:

Отправить комментарий