Skip to content

Commit 33f7da4

Browse files
committed
Improve logging
1 parent ac306b3 commit 33f7da4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Logger/LogsnagHandler.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,18 @@ protected function write(array $record): void
6464
*/
6565
public function getEvent(array $record): string
6666
{
67-
return $record['formatted'];
67+
return "{$record['channel']}.{$record['level_name']}: {$record['message']}";
68+
}
69+
70+
/**
71+
* Gets the description for the record.
72+
*
73+
* @param array $record
74+
* @return string
75+
*/
76+
public function getDescription(array $record): string
77+
{
78+
return $record['context'];
6879
}
6980

7081
/**

0 commit comments

Comments
 (0)