qqq
This commit is contained in:
@@ -233,15 +233,15 @@ class Logger implements LoggerInterface
|
|||||||
*/
|
*/
|
||||||
private function _string($context): string
|
private function _string($context): string
|
||||||
{
|
{
|
||||||
if ($context instanceof \Throwable) {
|
|
||||||
$context = 'file -> ' . $context->getFile() . PHP_EOL . 'line -> ' . $context->getLine() . PHP_EOL;
|
|
||||||
}
|
|
||||||
if (is_array($context) && isset($context[0]) && $context[0] instanceof \Throwable) {
|
|
||||||
$context = 'file -> ' . $context[0]->getFile() . PHP_EOL . 'line -> ' . $context[0]->getLine() . PHP_EOL;
|
|
||||||
}
|
|
||||||
if (is_string($context)) {
|
if (is_string($context)) {
|
||||||
return $context . PHP_EOL;
|
return $context . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
if ($context instanceof \Throwable) {
|
||||||
|
return 'file -> ' . $context->getFile() . PHP_EOL . 'line -> ' . $context->getLine() . PHP_EOL;
|
||||||
|
}
|
||||||
|
if (is_array($context) && isset($context[0]) && $context[0] instanceof \Throwable) {
|
||||||
|
return 'file -> ' . $context[0]->getFile() . PHP_EOL . 'line -> ' . $context[0]->getLine() . PHP_EOL;
|
||||||
|
}
|
||||||
return implode(PHP_EOL, $context);
|
return implode(PHP_EOL, $context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class StdoutLogger extends Logger
|
|||||||
} else {
|
} else {
|
||||||
$this->errors[$model] = $message;
|
$this->errors[$model] = $message;
|
||||||
}
|
}
|
||||||
$this->error($model, [$message]);
|
$this->error($model, [throwable($message)]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user