Skip to content

Commit 2e45aa6

Browse files
author
linzhong
committed
日志格式修改
1 parent 01a0871 commit 2e45aa6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

DqLog.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ class DqLog{
1212

1313

1414
public static function writeLog($str,$flag=self::LOG_TYPE_NORMAL){
15-
$str = "[" . date('Y-m-d H:i:s') . "]PID=". DqMain::$pid.' '. $str;
15+
$p_name='';
16+
if(php_sapi_name()=='cli'){
17+
$p_name = cli_get_process_title();
18+
}
19+
$str = "[" . date('Y-m-d H:i:s') . "]p_name=".$p_name.' '. $str;
1620
$dir = self::getLogDir();
1721
$seg=date('Ymd');
1822
switch ($flag) {

0 commit comments

Comments
 (0)