From 446d54b4cb6bf489fc9d75f55843658e6f25d801 Mon Sep 17 00:00:00 2001 From: sebastianstucke87 <47354551+sebastianstucke87@users.noreply.github.com> Date: Fri, 1 Nov 2019 12:05:21 +0100 Subject: [PATCH] Add "exception"-context array key to docs --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 5571a25..a9f20c4 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,12 @@ class Foo if ($this->logger) { $this->logger->info('Doing work'); } + + try { + $this->doSomethingElse(); + } catch (Exception $exception) { + $this->logger->error('Oh no!', array('exception' => $exception)); + } // do something useful }