Skip to content

Commit

Permalink
[MOD] 增加部分打印
Browse files Browse the repository at this point in the history
  • Loading branch information
qin11152 committed Feb 12, 2023
1 parent a0ff367 commit c0def26
Show file tree
Hide file tree
Showing 3 changed files with 424 additions and 403 deletions.
17 changes: 11 additions & 6 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qRegisterMetaType<std::string>("std::string");
Logcxx::get_mutable_instance().Init("./log4cxx.properties");
LogInWidget w;
w.show();
return a.exec();
QApplication a(argc, argv);
qRegisterMetaType<std::string>("std::string");
//跨平台获取当前程序所在路径
QString strPath = QCoreApplication::applicationDirPath();
//设置log4cxx配置文件路径
std::string strLog4cxxPath = strPath.toStdString() + "/log4cxx.properties";
Logcxx::get_mutable_instance().Init(strLog4cxxPath.c_str());
_LOG(Logcxx::Level::INFO, "main start");
LogInWidget w;
w.show();
return a.exec();
}
Loading

0 comments on commit c0def26

Please sign in to comment.