|
@@ -8,10 +8,11 @@ function logInfo(){
|
|
|
$content .= $args[$i] . ' ';
|
|
|
}
|
|
|
$content .= PHP_EOL;
|
|
|
+ print($content);
|
|
|
file_put_contents(LOG_PATH, $content, FILE_APPEND);
|
|
|
}
|
|
|
//记录错误日志
|
|
|
-function logError($content){
|
|
|
+function logError(){
|
|
|
$content = '[ERR]';
|
|
|
$args = func_get_args();
|
|
|
$argc = func_num_args();
|
|
@@ -19,6 +20,7 @@ function logError($content){
|
|
|
$content .= $args[$i] . ' ';
|
|
|
}
|
|
|
$content .= PHP_EOL;
|
|
|
+ print($content);
|
|
|
file_put_contents(LOG_PATH, $content, FILE_APPEND);
|
|
|
}
|
|
|
|
|
@@ -128,10 +130,6 @@ function loadRepoConfigs($vendorDir,$repoNames){
|
|
|
|
|
|
//解析部署配置文件
|
|
|
function loadConfig($cfgPath){
|
|
|
- if(! file_exists($cfgPath) ){
|
|
|
- logError("config file not exists",$cfgPath);
|
|
|
- return false;
|
|
|
- }
|
|
|
$config = json_decode(file_get_contents($cfgPath), true);
|
|
|
if(!$config){
|
|
|
logError("failed to decode config file",$cfgPath);
|