test/transposition_table_test.cpp
bool init_logger(const std::string& path) noexcept {
    try {
#ifdef WINDOWS
        std::string base(path.substr(0, arg.find_last_of("\\")));
#else
        std::string base(path.substr(0, path.find_last_of("/")));
#endif // WINDOWS
        std::string path_to_log(base + "/../../logs/Prometheus-TranspositionTableTest.log");

        auto logger = spdlog::daily_logger_st(logger_name, path_to_log, 4, 59);
        logger->set_level(spdlog::level::debug);

    } catch (const spdlog::spdlog_ex& ex) {
        std::cout << "Log initialization failed: " << ex.what() << std::endl;
        return false;
    }

    return true;
}
/**
 * initializes the logger; assumes that the folder containing the executable is in the same directory as the folder
 * storing the log text files.
 * @param path the path to the executable of this program
 * @return     boolean representing the success of the function
 */
initializes the logger; assumes that the folder containing the executable is in the same directory as the folder
storing the log text files.
@param path the path to the executable of this program
@return     boolean representing the success of the function
initializes the logger ; assumes that the folder containing the executable is in the same directory as the folder storing the log text files . @param path the path to the executable of this program @return boolean representing the success of the function
bool init_logger(const std::string& path) noexcept {
    try {
#ifdef WINDOWS
        std::string base(path.substr(0, arg.find_last_of("\\")));
#else
        std::string base(path.substr(0, path.find_last_of("/")));
#endif 
        std::string path_to_log(base + "/../../logs/Prometheus-TranspositionTableTest.log");
        auto logger = spdlog::daily_logger_st(logger_name, path_to_log, 4, 59);
        logger->set_level(spdlog::level::debug);
    } catch (const spdlog::spdlog_ex& ex) {
        std::cout << "Log initialization failed: " << ex.what() << std::endl;
        return false;
    }
    return true;
}
bool init_logger ( const std :: string & path ) noexcept { try { #ifdef WINDOWS std :: string base ( path . substr ( 0 , arg . find_last_of ( " \\ " ) ) ) ; #else std :: string base ( path . substr ( 0 , path . find_last_of ( " " ) ) ) ; #endif std :: string path_to_log ( base + " " ) ; auto logger = spdlog :: daily_logger_st ( logger_name , path_to_log , 4 , 59 ) ; logger -> set_level ( spdlog :: level :: debug ) ; } catch ( const spdlog :: spdlog_ex & ex ) { std :: cout << " " << ex . what ( ) << std :: endl ; return false ; } return true ; }
initializes the logger; assumes that the folder containing the executable is in the same directory as the folder
 storing the log text files.
initializes the logger ; assumes that the folder containing the executable is in the same directory as the folder storing the log text files .
// WINDOWS