|
@@ -536,7 +536,7 @@ bool CPythonExecutor::InitScript(std::string strScript, std::string strLogPath,
|
|
{
|
|
{
|
|
// 判断脚本是否存在;
|
|
// 判断脚本是否存在;
|
|
if (!PathFileExists(strScript.c_str())) {
|
|
if (!PathFileExists(strScript.c_str())) {
|
|
- printf("Error:脚本文件不存在\n");
|
|
|
|
|
|
+ GLOBAL::WriteTextLog("【Error】脚本文件不存在:%s\n", strScript.c_str());
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -544,14 +544,14 @@ bool CPythonExecutor::InitScript(std::string strScript, std::string strLogPath,
|
|
if (!PathFileExists(strLogPath.c_str())) {
|
|
if (!PathFileExists(strLogPath.c_str())) {
|
|
// 创建路径;
|
|
// 创建路径;
|
|
if (!GLOBAL::MKDIR(strLogPath.c_str())) {
|
|
if (!GLOBAL::MKDIR(strLogPath.c_str())) {
|
|
- printf("Error:创建目录失败\n");
|
|
|
|
|
|
+ GLOBAL::WriteTextLog("【Error】创建目录失败:%s\n", strLogPath.c_str());
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
// 创建文件;
|
|
// 创建文件;
|
|
std::ofstream flog(strLogPath.c_str());
|
|
std::ofstream flog(strLogPath.c_str());
|
|
if ( flog.bad() ) {
|
|
if ( flog.bad() ) {
|
|
- printf("Error:创建文件失败\n");
|
|
|
|
|
|
+ GLOBAL::WriteTextLog("【Error】创建文件失败:%ld,%s\n", GetLastError(), strLogPath.c_str());
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
flog.close();
|
|
flog.close();
|