Commit Graph

6 Commits

Author SHA1 Message Date
bruno-ds
daf24d8cb3 N°4261 - implement feedbacks from the team
plus:
 - the entrypoint is now `LogException()` instead of `FromException()` which sounded more like a factory and less like an active method.
 - merge conflicting commit with @molkobain (CC fix)
 - remove the writing of the exception object in the error.log context (adding it was an error, it's way too verbose!!).
   - Technical note: The context is still used to propagate the exception across several call stack, so it now uses a less generic naming in order to avoid conflicts (see `ExceptionLog::CONTEXT_EXCEPTION`). another solution would have been to add a new parameter to `ExceptionLog::Log()`, but I didn't want to add constraint over the hypothetical evolution of the base class method.
2021-09-20 12:27:39 +02:00
bruno-ds
6e0d570d41 N°4261 - Portal exception logging: Add exception's file and line to the context.
plus:
 - the exception object is no more automatically added to the error.log context (it's way too verbose)
 - code cleanup (use constant instead of repeated strings)
 - ExceptionLog main method is now named `LogException` instead of `FromException`
2021-09-20 12:27:39 +02:00
Molkobain
6271a33fdb Code review: Fix code conventions 2021-09-16 14:53:40 +02:00
bruno-ds
d1721b0834 N°4261 -Fix CI
Try to repair an odd error in the CI:
> Fatal error: Uncaught Exception: Serialization of 'ReflectionClass' is not allowed

avoid instantiation in the provider, delay them to the actual test
2021-09-15 14:39:00 +02:00
bruno-ds
66e4f369f7 N°4261 -Fix CI
Try to repair an odd error in the CI:
> Fatal error: Uncaught Exception: Serialization of 'ReflectionClass' is not allowed

Maybe it's triggered by the mocks being a property of the test class, so I inlined them.
+ misc. minor modification in order to try to figure out what is causing this behavior.
2021-09-15 13:34:04 +02:00
bruno-ds
5d23a250ae N°4261 - New log handler dedicated to Exceptions & use of it in the portal's Exception listener
Such Exceptions are triggered with a Warning level and default the minimum default level in order to write in DB is above, so the behavior is not modified:
 - logs are written in errors.log (with a warning elvel instead of an error)
 - logs are not written in DB unless `log_level_min.write_in_db` is changed
2021-09-14 17:40:11 +02:00