[Net-IMAP-Server] Logging

Alex Vandiver alexmv at bestpractical.com
Fri Oct 16 16:56:24 EDT 2009


On Tue, 2009-10-13 at 13:26 +0200, Dan Keder wrote:
> I refined logging in Net::IMAP::Server. It is possible to log into file, 
> to stdout or using syslog. There are three new options for 
> Net::IMAP::Server->new():

I'm actually not terribly tempted to accept this patch.  The reason why
is that everyone has a preferred logging format and infrastructure.  For
instance, we use Log::Log4perl as a log dispatch infrastructure ocally,
which is what our instance of Net::IMAP::Server uses for logging.  It's
essentially already required that you subclass Net::IMAP::Server in
order to use it for anything interesting, so expecting that users will
override the Net::IMAP::Server::Connection->log (or Net::Server->log,
see below) method doesn't seem unreasonable.

I'd rather stay away from growing a logging dispatcher on the side of
Net::IMAP::Server, which is what this looks to be becoming.  However,
I'd be fine with making the default ->log method be
Net::IMAP::Server->log instead of Net::IMAP::Server::Connection->log,
and making use of Net::Server's concept of loglevels throughout
Net::IMAP::Server's code.

> I also added support for flat mailbox structure, i.e. mailboxes with 
> undefined hierarchy separator. It is in the same diff file (Sorry for 
> that, I am too lazy to separate it. If you need it as two files, I can 
> look into it.).

I applied the hunks associated with this.  In the future, I'd appreciate
it if you split differing functionality into separate patches.  You also
seem to be generating your git patches not against Net::IMAP::Server's
git repository, but some other repository which also includes
Net::Server::Coro, which makes them harder to apply.
 - Alex



More information about the Net-IMAP-Server mailing list