You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Jiří Kuhn <ji...@clapix.com> on 2008/11/11 08:33:38 UTC

[FTPSERVER] The way of logging exceptions

Hello,

I would like to keep track of broken uploads (stored files) in terms "upload
is broken if an exception is thrown during the upload". But exceptions are
logged uder level DEBUG, which is quite confusing for me.

For example the STOR command:

- the STOR logger is configured to print only INFO and higher levels
- I'm uploading file abc.txt
- the log sais LOG.info("File upload : " + userName + " - " + fileName) ->
File upload : userxy - abc.txt
- an exception is throws, for example IOException
- the log sais LOG.debug("IOException during data transfer", ex) ->
silence....
- the file is not uploaded
- but I have no notice about it in the log and I don't know the reason why
the file is lost
- I don't need successful uploaded files logged

I thing, no, I believe that exceptions are not debugging messages. What do
you think?

Regards,
Jiří Kuhn.

Re: [FTPSERVER] The way of logging exceptions

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Tue, Nov 11, 2008 at 8:33 AM, Jiří Kuhn <ji...@clapix.com> wrote:
> I thing, no, I believe that exceptions are not debugging messages. What do
> you think?

The reasoning, while it might not be a good one, is that these are
exceptions that occur as part of "normal" user behavior, like
disconnecting in the middle of a upload. Therefore we log them at a
low level, but INFO might be a better choice than debug. I would like
to use ERROR only for exceptions that will cause problems with
FtpServer.

/niklas