1

Make logging use features of Log::Any and log as it should be done via this module. Cleanup sample config.

This commit is contained in:
eleksir
2021-05-04 18:04:32 +03:00
parent 095cb57a18
commit 096877bee2
15 changed files with 104 additions and 78 deletions

View File

@@ -9,6 +9,7 @@ use English qw ( -no_match_vars );
use Carp qw (cluck);
use CHI;
use CHI::Driver::BerkeleyDB;
use Log::Any qw ($log);
use BotLib::Conf qw (LoadConf);
use version; our $VERSION = qw (1.0);
@@ -52,7 +53,7 @@ sub KarmaSet (@) {
}
if ($cache->set ($phrase, $score, 'never') != $score) {
cluck 'Cache error: unable to set karma.';
$log->error ('[ERROR] Cache error: unable to set karma.');
}
if ($score < -1 && (($score % (0 - $max)) + 1) == 0) {