diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-09-03 08:37:50 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-09-05 20:58:39 +0200 |
commit | ff58732c0d56a5269a31c132cd5bd0fe5b9ad3fa (patch) | |
tree | e2eaffa273423b047d9e4e66c12ae83244371d7f /lib/public/Support | |
parent | 0899f2cbc43b05005dc045db001c41e199192f67 (diff) | |
download | nextcloud-server-ff58732c0d56a5269a31c132cd5bd0fe5b9ad3fa.tar.gz nextcloud-server-ff58732c0d56a5269a31c132cd5bd0fe5b9ad3fa.zip |
Add breadcrumb support to crash reporters
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public/Support')
-rw-r--r-- | lib/public/Support/CrashReport/ICollectBreadcrumbs.php | 43 | ||||
-rw-r--r-- | lib/public/Support/CrashReport/IRegistry.php | 11 |
2 files changed, 54 insertions, 0 deletions
diff --git a/lib/public/Support/CrashReport/ICollectBreadcrumbs.php b/lib/public/Support/CrashReport/ICollectBreadcrumbs.php new file mode 100644 index 00000000000..6f331077f1a --- /dev/null +++ b/lib/public/Support/CrashReport/ICollectBreadcrumbs.php @@ -0,0 +1,43 @@ +<?php + +declare(strict_types=1); + +/** + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Support\CrashReport; + +/** + * @since 15.0.0 + */ +interface ICollectBreadcrumbs extends IReporter { + + /** + * Collect breadcrumbs for crash reports + * + * @param string $message + * @param string $category + * @param array $context + * + * @since 15.0.0 + */ + public function collect(string $message, string $category, array $context = []); + +} diff --git a/lib/public/Support/CrashReport/IRegistry.php b/lib/public/Support/CrashReport/IRegistry.php index 62432c782ab..fe6f6beb7bb 100644 --- a/lib/public/Support/CrashReport/IRegistry.php +++ b/lib/public/Support/CrashReport/IRegistry.php @@ -39,6 +39,17 @@ interface IRegistry { public function register(IReporter $reporter); /** + * Delegate breadcrumb collection to all registered reporters + * + * @param string $message + * @param string $category + * @param array $context + * + * @since 13.0.0 + */ + public function delegateBreadcrumb(string $message, string $category, array $context = []); + + /** * Delegate crash reporting to all registered reporters * * @since 13.0.0 |