修改oa接口日志记录方式

master
ELF 5 years ago
parent dc320ea811
commit dc4ef313ab

@ -7,6 +7,7 @@
*/ */
namespace SDK\Controller; namespace SDK\Controller;
use Think\Controller; use Think\Controller;
use Think\Log;
class FengHuoApiController extends Controller{ class FengHuoApiController extends Controller{
// protected function _initialize(){ // protected function _initialize(){
@ -104,7 +105,7 @@ class FengHuoApiController extends Controller{
]; ];
} }
file_put_contents(dirname(__FILE__).'/'.date('Ymd').'registerDetail.log', date('Y-m-d H:i:s') . ' ---- ' . json_encode($result) . PHP_EOL, FILE_APPEND); Log::write('registerDetail:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($result), 'INFO');
return $this->ajaxReturn($result); return $this->ajaxReturn($result);
} }
@ -154,7 +155,7 @@ class FengHuoApiController extends Controller{
]; ];
} }
file_put_contents(dirname(__FILE__).'/'.date('Ymd').'payDetail.log', date('Y-m-d H:i:s') . ' ---- ' . json_encode($result) . PHP_EOL, FILE_APPEND); Log::write('payDetail:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($result), 'INFO');
return $this->ajaxReturn($result); return $this->ajaxReturn($result);
@ -202,7 +203,7 @@ class FengHuoApiController extends Controller{
]; ];
} }
file_put_contents(dirname(__FILE__).'/'.date('Ymd').'roleInfo.log', date('Y-m-d H:i:s') . ' ---- ' . json_encode($result) . PHP_EOL, FILE_APPEND); Log::write('roleInfo:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($result), 'INFO');
return $this->ajaxReturn($result); return $this->ajaxReturn($result);
@ -266,7 +267,7 @@ class FengHuoApiController extends Controller{
]; ];
} }
file_put_contents(dirname(__FILE__).'/'.date('Ymd').'loginInfo.log', date('Y-m-d H:i:s') . ' ---- ' . json_encode($result) . PHP_EOL, FILE_APPEND); Log::write('loginInfo:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($result), 'INFO');
return $this->ajaxReturn($result); return $this->ajaxReturn($result);
@ -325,7 +326,7 @@ class FengHuoApiController extends Controller{
]; ];
} }
file_put_contents(dirname(__FILE__).'/'.date('Ymd').'bindHistory.log', date('Y-m-d H:i:s') . ' ---- ' . json_encode($result) . PHP_EOL, FILE_APPEND); Log::write('bindHistory:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($result), 'INFO');
return $this->ajaxReturn($result); return $this->ajaxReturn($result);
} }

Loading…
Cancel
Save