@@ -34,21 +34,21 @@ int main(int argc, char** argv) {
34
34
// 初始化日志系统
35
35
myframe::InitLog (MYFRAME_LOG_DIR, module_args.GetProcessName ());
36
36
LOG (INFO) << " launch command: " << module_args.GetCmd ();
37
- std::string root_dir = myframe::Common::GetWorkRoot ();
37
+ auto root_dir = myframe::Common::GetWorkRoot ();
38
38
auto lib_dir = myframe::Common::GetAbsolutePath (MYFRAME_LIB_DIR);
39
39
auto service_dir = myframe::Common::GetAbsolutePath (MYFRAME_SERVICE_DIR);
40
40
auto log_dir = myframe::Common::GetAbsolutePath (MYFRAME_LOG_DIR);
41
41
auto conf_dir = myframe::Common::GetAbsolutePath (MYFRAME_CONF_DIR);
42
- LOG (INFO) << " root dir: " << root_dir;
43
- LOG (INFO) << " default lib dir: " << lib_dir;
44
- LOG (INFO) << " default service dir: " << service_dir;
45
- LOG (INFO) << " default log dir: " << log_dir;
46
- LOG (INFO) << " default conf dir: " << conf_dir;
42
+ LOG (INFO) << " root dir: " << root_dir. string () ;
43
+ LOG (INFO) << " default lib dir: " << lib_dir. string () ;
44
+ LOG (INFO) << " default service dir: " << service_dir. string () ;
45
+ LOG (INFO) << " default log dir: " << log_dir. string () ;
46
+ LOG (INFO) << " default conf dir: " << conf_dir. string () ;
47
47
48
48
// 初始化并启动线程
49
49
g_app = std::make_shared<myframe::App>();
50
50
if (false == g_app->Init (
51
- lib_dir,
51
+ lib_dir. string () ,
52
52
module_args.GetThreadPoolSize (),
53
53
module_args.GetConnEventSize (),
54
54
module_args.GetWarningMsgSize ())) {
@@ -64,7 +64,7 @@ int main(int argc, char** argv) {
64
64
if (myframe::Common::IsAbsolutePath (conf)) {
65
65
abs_conf_file = conf;
66
66
} else {
67
- abs_conf_file = service_dir + conf;
67
+ abs_conf_file = ( service_dir / conf). string () ;
68
68
}
69
69
if (!g_app->LoadServiceFromFile (abs_conf_file)) {
70
70
LOG (ERROR) << " Load " << abs_conf_file << " failed, exit" ;
@@ -78,7 +78,7 @@ int main(int argc, char** argv) {
78
78
if (myframe::Common::IsAbsolutePath (module_args.GetConfDir ())) {
79
79
abs_service_dir = module_args.GetConfDir ();
80
80
} else {
81
- abs_service_dir = root_dir + " / " + module_args.GetConfDir () + " / " ;
81
+ abs_service_dir = ( root_dir / module_args.GetConfDir ()). string () ;
82
82
}
83
83
} else {
84
84
abs_service_dir = service_dir;
0 commit comments