mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-29 11:26:09 +01:00
Add support for serializing resources in LineFormatter
This commit is contained in:
@@ -96,6 +96,10 @@ class LineFormatter implements FormatterInterface
|
||||
return $normalized;
|
||||
}
|
||||
|
||||
if (is_resource($data)) {
|
||||
return '[resource]';
|
||||
}
|
||||
|
||||
return sprintf("[object] (%s: %s)", get_class($data), json_encode($data));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user