[ 'enable' => true, 'file' => runtime_path() . 'paylog'.DIRECTORY_SEPARATOR.date('Ym').DIRECTORY_SEPARATOR.date('d').'.log', 'level' => env('app_debug') ? 'debug' : 'info', // 建议生产环境等级调整为 info,开发环境为 debug 'type' => 'single', // optional, 可选 daily. 'max_file' => 30, // optional, 当 type 为 daily 时有效,默认 30 天 ], 'http' => [ // optional 'timeout' => 5.0, ] ], [ $type => [ 'default' => $config ] ] ); } public function returnFormat($param){ if($param instanceof \Psr\Http\Message\MessageInterface){ return $param->getBody()->getContents(); }else if($param instanceof \Yansongda\Supports\Collection){ return $param->all(); }else{ return $param; } } }