summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-07-17 16:20:05 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-07-17 16:20:05 +0200
commitae2545a2e081dbc4daaa615f948a942b93df4368 (patch)
treecf7a23dec8c41ebedd1e00b092c6d41f03c21127
parent33fb0a750ae4b0bb9adb0fe288b4723c1a01fc3a (diff)
downloadApp-ImapNotify-ae2545a2e081dbc4daaa615f948a942b93df4368.tar.gz
App-ImapNotify-ae2545a2e081dbc4daaa615f948a942b93df4368.tar.xz
Add very simple --debug switch to get debug logging
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xscript/imap-notify.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/imap-notify.pl b/script/imap-notify.pl
index f2f7c2c..cea3af1 100755
--- a/script/imap-notify.pl
+++ b/script/imap-notify.pl
@@ -16,7 +16,7 @@ use strict;
use App::ImapNotify;
use Function::Parameters;
use MCE::Hobo;
-use Log::Any::Adapter ('Stderr', log_level => "warn");
+use Log::Any::Adapter ('Stderr', log_level => "info");
my $config = [
{
@@ -37,6 +37,10 @@ my $config = [
#},
];
+if ($ARGV[0] // "" eq "--debug") {
+ Log::Any::Adapter->set("Stderr", log_level => "trace");
+}
+
#$IO::Socket::SSL::DEBUG = 4;
my @workers;