File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,11 @@ public function newFromMonolog(array $record)
214214 {
215215 if (!empty ($ this ->connection )) {
216216 if ($ this ->saveWithQueue ) {
217+ if (isset ($ record ['context ' ]['exception ' ]) and !empty ($ record ['context ' ]['exception ' ])) {
218+ if (strpos (get_class ($ record ['context ' ]['exception ' ]), "Exception " ) !== false ) {
219+ dispatch_now (new SaveNewLogEvent ($ this , $ record ));
220+ }
221+ }
217222 if (empty ($ this ->saveWithQueueName ) and empty ($ this ->saveWithQueueConnection )) {
218223 dispatch (new SaveNewLogEvent ($ this , $ record ));
219224 } else if (!empty ($ this ->saveWithQueueName ) and !empty ($ this ->saveWithQueueConnection )) {
@@ -227,7 +232,7 @@ public function newFromMonolog(array $record)
227232 dispatch (new SaveNewLogEvent ($ this , $ record ))
228233 ->onQueue ($ this ->saveWithQueueName );
229234 }
230- } else {
235+ } else {
231236 $ log = CreateLogFromRecord::generate (
232237 $ this ->connection ,
233238 $ this ->collection ,
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function setContextAttribute(array $value)
5252 if (isset ($ value ['exception ' ])) {
5353 if (!empty ($ value ['exception ' ])) {
5454 $ exception = $ value ['exception ' ];
55- if (strpos (get_class ($ exception ), "\ Exception " ) !== false ) {
55+ if (strpos (get_class ($ exception ), "Exception " ) !== false ) {
5656 $ newexception = [];
5757 $ newexception ['class ' ] = get_class ($ exception );
5858 if (method_exists ($ exception , 'getMessage ' )) {
You can’t perform that action at this time.
0 commit comments