diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2019-11-07 16:42:52 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2019-11-07 20:53:19 +0100 |
commit | a4a371234215a7705f304875cc8af067bf3142af (patch) | |
tree | 53fe58c399908b0eb2206056ef82eb72d69c97c7 /pullimap | |
parent | 6c5f762596af9567afc4691beea212483fa7a07a (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-x | pullimap | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 ); }; |