You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can get the abs_path of the folder of exe in the code, and prepend it to the log path in global config:
el::Loggers::configureFromGlobal((get_folder_of_exe() / "easylogging++.conf").string().c_str());
// update path of the main log file to be not relative to active folder, but to the folder of exeauto logger = el::Loggers::getLogger("default");
std::string abs_filepath = (get_folder_of_exe() / logger->typedConfigurations()->filename(el::Level::Info)).string();
logger->configurations()->setGlobally(el::ConfigurationType::Filename, abs_filepath);
logger->reconfigure();
but:
it still create empty log file in the old location,
it requires hardcode of logger id ("default"), but I want path to be related to the exe of all loggers, that could be added in the global.conf later.
P.S. "active folder" is different from the "exe folder" if I try to launch exe in the console from a different location.
The text was updated successfully, but these errors were encountered:
I can get the abs_path of the folder of exe in the code, and prepend it to the log path in global config:
but:
P.S. "active folder" is different from the "exe folder" if I try to launch exe in the console from a different location.
The text was updated successfully, but these errors were encountered: