https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014

--- Comment #52 from Lari Taskula <[email protected]> ---
(In reply to Nick Clemens (kidclamp) from comment #51)
> In the new catch, we specifically handle two types of exceptions, but we
> don't have an else case, so if another exception is thrown, it's just going
> to be ignored.
The other exceptions are handled in the follow-up patch.

> I kind of think if we're throwing an exception, we should always log it. The
> librarian may see the alert, and then dismiss it, without resolving the
> problem, having it in the logs ensures it can be found later. I would
> actually lean towards making all exceptions log, every time - if we think it
> warrants an exception, I think it warrants logging
It would be first useful to test the amount of data that would be logged in a
production environment if we had this enabled.

Personally I don't think we should do it by default. Every unhandled exception
must be logged, but as for caught exceptions, I'd leave it up for the developer
to decide. In my opinion not every exception we have is always logworthy, for
example failing to meet minimum password requirements when setting a password
(in many cases we have frontend validation to avoid a HTTP request/an
exception, but there are also REST API clients that just pass Koha whatever
input was given by the user).

But then again someone else could find that useful. Maybe a patron calls the
library and the library has so awesome customer support that the system
administrator checks exception logs and finds that their password contained a
whitespace (Koha::Exceptions::Password::WhitespaceCharacters logged).

If we did something like that, the log level should probably be at most to
'trace'.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to