Commit Graph

15 Commits

Author SHA1 Message Date
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Julius Härtl
00b7575c89
perf(logging): Return early when log level does not match before serializing an exception
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-01-16 09:47:31 +01:00
Côme Chilliet
069477e608
Migrate more classes of lib/private to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 16:52:52 +02:00
Christoph Wurst
35a9ad0d78
Unshift crash reports when they are loaded, to break the recusion
If, for whatever reason, during the loading of a crash reporter a new
log entry is generated, then the lazy loading mechanism will be invoked
*again* while it's already executed. This doesn't result in an endless
recursion, but means that the crash reporters will be built and
registered many times. This then means any further log entry will be
logged x times instead of once.

Unshift makes sure to take the class off the registration list right
away, so another invokation of the same method won't try to do the same
job.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-24 15:31:49 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Christoph Wurst
2b7b7144d4
Allow crash reporters registration during app bootstrap
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-19 10:38:26 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Christoph Wurst
d3a244f9d9
Allow crash reporters to catpture any message
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-05-09 14:06:44 +02:00
Christoph Wurst
b4b095ca91
Fix @since version on new API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-09-05 20:58:39 +02:00
Christoph Wurst
ff58732c0d
Add breadcrumb support to crash reporters
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-09-05 20:58:39 +02:00
Morris Jobke
72bb7c3074
Fix PHP doc for API docs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-12-03 12:02:29 +01:00
Morris Jobke
f6ef3b6464
add proper type hinting
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-14 14:49:24 +01:00
Christoph Wurst
ad757805ca Pass the exception context to the crash reporter
This should allow better reports as often the app id is passed
as context. While this is not used right now, I'd like to have this
for NC13 as adding it later will break the interface for existing apps

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-11-14 14:28:04 +01:00
Christoph Wurst
4c5593998a Add a mechanism to register crach reporters
This adds a crash reporter registry, which is meant for third party apps
to hook into the error logging/reporting chain. This way, external tools
like Sentry can be used to track and aggregate system crashes.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-11-14 12:20:05 +01:00