mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-26 20:04:45 +01:00
Fix log controller
This commit is contained in:
parent
8ab0dbd8cd
commit
c2d355eb07
@ -3,6 +3,7 @@
|
||||
namespace TelegramApiServer\EventObservers;
|
||||
|
||||
use TelegramApiServer\Logger;
|
||||
use Throwable;
|
||||
|
||||
class LogObserver
|
||||
{
|
||||
@ -22,9 +23,9 @@ class LogObserver
|
||||
public static function log($message, int $level)
|
||||
{
|
||||
if (is_scalar($message)) {
|
||||
Logger::getInstance()->log(Logger::$madelineLevels[$level], (string) $message);
|
||||
Logger::getInstance()->log(Logger::$madelineLevels[$level], (string)$message);
|
||||
} else {
|
||||
if ($message instanceof \Throwable) {
|
||||
if ($message instanceof Throwable) {
|
||||
$message = Logger::getExceptionAsArray($message);
|
||||
}
|
||||
if (is_array($message)) {
|
||||
|
Loading…
Reference in New Issue
Block a user