CTK::Log - CTK Logging methods
Version 2.60
$c = new CTK ( loglevel => 'info', # or '1' logfile => CTK::catfile($LOGDIR,'foo.log'), logseparator => " ", # as default ); $c->log( INFO => " ... Blah-Blah-Blah ... " ); $c->log_except(); # 9 exception $c->log_fatal(); # 8 fatal $c->log_emerg(); # 7 system is unusable $c->log_alert(); # 6 action must be taken immediately $c->log_crit(); # 5 critical conditions $c->log_error(); # 4 error conditions $c->log_warning(); # 3 warning conditions $c->log_notice(); # 2 normal but significant condition $c->log_info(); # 1 informational $c->log_debug(); # 0 debug-level messages (default)
All of methods are returned by log-records
# Log File defined in constructor $c = new CTK ( loglevel => 'info', # or '1' logfile => CTK::catfile($LOGDIR,'foo.log'), logseparator => " ", # as default ); # Log File defined after constructor $c->logfile(catfile($c->logdir(), dformat($cmddata{logfile}, { COMMAND => $command, PREFIX => $c->prefix(), SUFFIX => $c->suffix(), EXT => 'log', DEFAULT => LOGFILE, } ) ) );
$c->log( INFO => " ... Blah-Blah-Blah ... " );
Logging with info level (1). Same as log_info
$c->log_debug();
Level 0: debug-level messages (default)
$c->log_info();
Level 1: informational
$c->log_notice();
Level 2: normal but significant condition
$c->log_warning();
Level 3: warning conditions
$c->log_error();
Level 4: error conditions
$c->log_crit();
Level 5: critical conditions
$c->log_alert();
Level 6: action must be taken immediately
$c->log_emerg();
Level 7: system is unusable
$c->log_fatal();
Level 8: fatal
$c->log_except();
Level 9: exception
Sergey Lepenkov (Serz Minus) http://www.serzik.com <minus@mail333.com>
Copyright (C) 1998-2017 D&D Corporation. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms and conditions as Perl itself.
This program is distributed under the GNU LGPL v3 (GNU Lesser General Public License version 3).
See LICENSE file
LICENSE
To install CTK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CTK
CPAN shell
perl -MCPAN -e shell install CTK
For more information on module installation, please visit the detailed CPAN module installation guide.