From 33fb0a750ae4b0bb9adb0fe288b4723c1a01fc3a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 17 Jul 2018 16:06:37 +0200 Subject: ImapNotify: Clean line before logging in loop() Signed-off-by: Florian Pritz --- lib/App/ImapNotify.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/App/ImapNotify.pm b/lib/App/ImapNotify.pm index 0b44f68..1445c13 100644 --- a/lib/App/ImapNotify.pm +++ b/lib/App/ImapNotify.pm @@ -65,14 +65,14 @@ method loop() { $log->info("Waiting for notify events"); while (my $line = $imap->readline_timeout()) { - $log->tracef("Got line: '%s'", $line); + $log->tracef("Got line: '%s'", $line =~ s/\r\n$//r); if ($line =~ m/^\* .* FETCH /) { my $message = $imap->handle_fetch($line); $self->_notify($message); next; } if ($line =~ m/^\* STATUS (?[^ ]+) \(MESSAGES \d+ UIDNEXT (?\d+) UNSEEN \d+\)/) { - $log->debugf("Got status change: '%s'", $line); + $log->debugf("Got status change: '%s'", $line =~ s/\r\n$//r); my $mailbox = $+{mailbox}; my $uid = $+{uidnext} - 1; #$imap2->select($mailbox); -- cgit v1.2.3-24-g4f1b