Compare commits

...

4 Commits

Author SHA1 Message Date
as2252258 3fc1b16f33 eee 2024-04-15 15:39:31 +08:00
as2252258 103b757a05 eee 2024-04-15 15:39:03 +08:00
as2252258 b52270ff25 eee 2024-01-10 17:52:18 +08:00
as2252258 c0aa9acb19 eee 2024-01-10 17:49:50 +08:00
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ if (!function_exists('json_validator')) {
*/
function json_validator(string $data): bool
{
return is_null(json_decode($data));
return is_array(json_decode($data, true));
}
}
+10
View File
@@ -95,6 +95,16 @@ class StdoutLogger extends Component
}
/**
* @param string $message
* @return void
*/
public function println(string $message): void
{
file_put_contents('php://output', '[' . date('Y-m-d H:i:s') . '] ' . $message . PHP_EOL, FILE_APPEND);
}
/**
* @param string $name
* @param array $arguments