수정
This commit is contained in:
@@ -6,7 +6,7 @@ if (! function_exists('write_custom_log')) {
|
||||
*/
|
||||
function write_custom_log($message, $level = 'INFO', $type = 'service')
|
||||
{
|
||||
$logDir = WRITEPATH . 'logs/worker';
|
||||
$logDir = WRITEPATH . 'logs';
|
||||
if (!is_dir($logDir)) {
|
||||
@mkdir($logDir, 0777, true);
|
||||
}
|
||||
@@ -31,8 +31,8 @@ if (! function_exists('write_custom_log')) {
|
||||
}
|
||||
// ----------------------------
|
||||
|
||||
$suffix = ($type === 'failed') ? '_failed' : '';
|
||||
$logFile = $logDir . '/' . date('Y-m-d') . $suffix . '.log';
|
||||
$suffix = ($type === 'failed') ? '-failed' : '';
|
||||
$logFile = $logDir . '/log-' . date('Y-m-d') . $suffix . '.log';
|
||||
|
||||
$timestamp = date('Y-m-d H:i:s');
|
||||
$singleLine = str_replace(["\r", "\n", "\t"], " ", $message);
|
||||
|
||||
Reference in New Issue
Block a user