예제 #1
0
파일: ai.cpp 프로젝트: sv-esk/df-ai
void AI::debug(color_ostream & out, const std::string & str)
{
    std::string ts = timestamp();

    if (DEBUG)
    {
        write_df(out, "AI: " + ts + " " + str, "\n", "\n", DF2CONSOLE);
    }
    write_df(logger, ts + " " + str, "\n                 ");
}
예제 #2
0
파일: log.cpp 프로젝트: BenLubar/df-ai
void AI::debug(color_ostream & out, const std::string & str)
{
    std::string ts = timestamp();

    if (config.lockstep)
    {
        write_lockstep("AI: " + ts + " " + str);
    }
    if (config.write_console)
    {
        write_df(out, "AI: " + ts + " " + str, "\n", "\n", [](const std::string & in) -> std::string { return DF2CONSOLE(in); });
    }
    if (config.write_log)
    {
        write_df(logger, ts + " " + str, "\n                 ");
    }
}