aboutsummaryrefslogtreecommitdiffstats
path: root/pullimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-11-07 16:42:52 +0100
committerGuilhem Moulin <guilhem@fripost.org>2019-11-07 20:53:19 +0100
commita4a371234215a7705f304875cc8af067bf3142af (patch)
tree53fe58c399908b0eb2206056ef82eb72d69c97c7 /pullimap
parent6c5f762596af9567afc4691beea212483fa7a07a (diff)
Refactor logging logic.
Also, introduce new option 'logger-prefix' to determine the prefix of each log line. Closes: #942725.
Diffstat (limited to 'pullimap')
-rwxr-xr-xpullimap3
1 files changed, 2 insertions, 1 deletions
diff --git a/pullimap b/pullimap
index 81811e9..dcbe59b 100755
--- a/pullimap
+++ b/pullimap
@@ -233,7 +233,8 @@ sub smtp_send(@) {
my $IMAP = do {
my %config = (%$CONF, %CONFIG{qw/quiet debug/}, name => $ARGV[0]);
$config{keepalive} = 1 if defined $CONFIG{idle};
- $config{'logger-fd'} = \*STDERR if $CONFIG{debug};
+ $config{'logger-prefix'} = "%?n?%?m?%n(%m)&%n?: ?";
+ delete $config{mailbox}; # use SELECTed mailbox in log messages
Net::IMAP::InterIMAP::->new( %config );
};