mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-19 15:49:19 +02:00
#493 Include context in slack extra info.
This commit is contained in:
@@ -169,6 +169,15 @@ class SlackHandler extends SocketHandler
|
||||
'value' => $extra,
|
||||
'short' => false
|
||||
);
|
||||
|
||||
// Add all context items as individual fields
|
||||
foreach ($record['context'] as $var => $val) {
|
||||
$attachment['fields'][] = array(
|
||||
'title' => $var,
|
||||
'value' => $val,
|
||||
'short' => true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$dataArray['attachments'] = json_encode(array($attachment));
|
||||
|
Reference in New Issue
Block a user