• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetTimestampStr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetTimestampStr函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTimestampStr函数的具体用法?C++ GetTimestampStr怎么用?C++ GetTimestampStr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetTimestampStr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: worker

Log::Log() : worker(NULL)
{
    SetRealmID(0);
    m_logsTimestamp = "_" + GetTimestampStr();
    LoadFromConfig();
    pandashanLog = fopen("pandashan.log", "a");
}
开发者ID:AlucardVoss,项目名称:Patchs,代码行数:7,代码来源:Log.cpp


示例2: worker

Log::Log() : worker(NULL)
{
    SetRealmID(0);
    m_logsTimestamp = "_" + GetTimestampStr();
    LoadFromConfig();
    pandashanLog = fopen(std::string(m_logsDir).append("pandashan.log").c_str(), "a");
}
开发者ID:Exodius,项目名称:JadeCore548,代码行数:7,代码来源:Log.cpp


示例3: GetTimestampStr

void Log::ChangeLogFile(std::string name)
{
	//将旧日志文件改名
	std::string logname = m_logsDir + name;
	std::string storefile = m_logsDir + name + "." + GetTimestampStr(time(NULL) - 24*3600);

	// 移动到其他位置
	rename(logname.c_str(), storefile.c_str());
}
开发者ID:imane-jym,项目名称:gp,代码行数:9,代码来源:Log.cpp


示例4: GetTimestampStr

void Log::Initialize()
{
    std::string logsDir = sConfig.GetStringDefault("LogsDir","");

    if(!logsDir.empty())
    {
        if((logsDir.at(logsDir.length()-1)!='/') && (logsDir.at(logsDir.length()-1)!='\\'))
            logsDir.append("/");
    }

    std::string logfn=sConfig.GetStringDefault("LogFile", "");
    if(logfn!="")
    {
        if(sConfig.GetIntDefault("LogTimestamp",0))
        {
            std::string logTimestamp = sConfig.GetIntDefault("LogTimestamp",0) ? GetTimestampStr() : "";
            logTimestamp.insert(0,"_");
            size_t dot_pos = logfn.find_last_of(".");
            if(dot_pos!=logfn.npos)
                logfn.insert(dot_pos,logTimestamp);
            else
                logfn += logTimestamp;
        }

        logfile = fopen((logsDir+logfn).c_str(), "w");
    }

    std::string gmlogname = sConfig.GetStringDefault("GMLogFile", "");
    if(gmlogname!="")
    {
        gmLogfile = fopen((logsDir+gmlogname).c_str(), "a");
    }

    std::string dberlogname = sConfig.GetStringDefault("DBErrorLogFile", "");
    if(dberlogname!="")
    {
        dberLogfile = fopen((logsDir+dberlogname).c_str(), "a");
    }
    std::string ralogname = sConfig.GetStringDefault("RaLogFile", "");
    if(ralogname!="")
    {
        raLogfile = fopen((logsDir+ralogname).c_str(), "a");
    }
    m_logLevel     = sConfig.GetIntDefault("LogLevel", 0);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
    InitColors(sConfig.GetStringDefault("LogColors", ""));

    m_logFilter = 0;

    if(sConfig.GetIntDefault("LogFilter_TransportMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig.GetIntDefault("LogFilter_CreatureMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;
    if(sConfig.GetIntDefault("LogFilter_VisibilityChanges", 0)!=0)
        m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
}
开发者ID:Artea,项目名称:mangos-svn,代码行数:56,代码来源:Log.cpp


示例5: va_start

void Log::OutPandashan(const char* str, ...)
{
    if (!str)
        return;

    char result[MAX_QUERY_LEN];
    va_list ap;

    va_start(ap, str);
    vsnprintf(result, MAX_QUERY_LEN, str, ap);
    va_end(ap);

    std::string date = GetTimestampStr();
    fprintf(pandashanLog, "[%s] Pandashan LOG : %s\n", date.c_str(), result);
    fflush(pandashanLog);
}
开发者ID:Exodius,项目名称:JadeCore548,代码行数:16,代码来源:Log.cpp


示例6: GetTimestampStr

void Log::Initialize()
{
    /// Common log files data
    m_logsDir = sConfig.GetStringDefault("LogsDir","");
    if(!m_logsDir.empty())
    {
        if((m_logsDir.at(m_logsDir.length()-1)!='/') && (m_logsDir.at(m_logsDir.length()-1)!='\\'))
            m_logsDir.append("/");
    }

    m_logsTimestamp = "_" + GetTimestampStr();

    /// Open specific log files
    logfile = openLogFile("LogFile","LogTimestamp","w");

    m_gmlog_per_account = sConfig.GetBoolDefault("GmLogPerAccount",false);
    if(!m_gmlog_per_account)
        gmLogfile = openLogFile("GMLogFile","GmLogTimestamp","a");
    else
    {
        // GM log settings for per account case
        m_gmlog_filename_format = sConfig.GetStringDefault("GMLogFile", "");
        if(!m_gmlog_filename_format.empty())
        {
            bool m_gmlog_timestamp = sConfig.GetBoolDefault("GmLogTimestamp",false);

            size_t dot_pos = m_gmlog_filename_format.find_last_of(".");
            if(dot_pos!=m_gmlog_filename_format.npos)
            {
                if(m_gmlog_timestamp)
                    m_gmlog_filename_format.insert(dot_pos,m_logsTimestamp);

                m_gmlog_filename_format.insert(dot_pos,"_#%u");
            }
            else
            {
                m_gmlog_filename_format += "_#%u";

                if(m_gmlog_timestamp)
                    m_gmlog_filename_format += m_logsTimestamp;
            }

            m_gmlog_filename_format = m_logsDir + m_gmlog_filename_format;
        }
    }

    charLogfile = openLogFile("CharLogFile","CharLogTimestamp","a");
    dberLogfile = openLogFile("DBErrorLogFile",NULL,"a");
    raLogfile = openLogFile("RaLogFile",NULL,"a");
    worldLogfile = openLogFile("WorldLogFile","WorldLogTimestamp","a");

    // Main log file settings
    m_includeTime  = sConfig.GetBoolDefault("LogTime", false);
    m_logLevel     = sConfig.GetIntDefault("LogLevel", 0);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
    InitColors(sConfig.GetStringDefault("LogColors", ""));

    m_logFilter = 0;

    if(sConfig.GetBoolDefault("LogFilter_TransportMoves", true))
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig.GetBoolDefault("LogFilter_CreatureMoves", true))
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;
    if(sConfig.GetBoolDefault("LogFilter_VisibilityChanges", true))
        m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
    if(sConfig.GetBoolDefault("LogFilter_AchievementUpdates", true))
        m_logFilter |= LOG_FILTER_ACHIEVEMENT_UPDATES;

    // Char log settings
    m_charLog_Dump = sConfig.GetBoolDefault("CharLogDump", false);
}
开发者ID:FLaM666,项目名称:evo-X,代码行数:71,代码来源:Log.cpp


示例7: AppenderId

Log::Log() : AppenderId(0), lowestLogLevel(LOG_LEVEL_FATAL), _ioService(nullptr), _strand(nullptr)
{
    m_logsTimestamp = "_" + GetTimestampStr();
    RegisterAppender<AppenderConsole>();
    RegisterAppender<AppenderFile>();
}
开发者ID:piaoasd123,项目名称:ServerTest,代码行数:6,代码来源:Log.cpp


示例8: worker

Log::Log() : worker(NULL)
{
    SetRealmID(0);
    m_logsTimestamp = "_" + GetTimestampStr();
    LoadFromConfig();
}
开发者ID:heros,项目名称:LasCore,代码行数:6,代码来源:Log.cpp


示例9: GetTimestampStr

void Log::Initialize()
{
    // Common log files data
    m_logsDir = sConfig.GetStringDefault("LogsDir", "0 6 4 3 1 1 2 7 5 0 4 0 1 3 2 4 0");
    if (!m_logsDir.empty())
        if ((m_logsDir.at(m_logsDir.length() - 1) != '/') && (m_logsDir.at(m_logsDir.length() - 1) != '\\'))
            m_logsDir.append("/");

    m_logsTimestamp = "_" + GetTimestampStr();

    // Open specific log files
    FILE* logfile = openLogFile("LogFile", "LogTimestamp", "wb");

    for (int i = 0; i < MAX_LOG_TYPES; ++i)
        if (!m_logFiles[i])
            m_logFiles[i] = logfile;

    InitColors(sConfig.GetStringDefault("LogColors", "0 6 4 3 1 1 2 7 5 0 4 0 1 3 2 4 0"));

    m_gmlog_per_account = sConfig.GetBoolDefault("GmLogPerAccount", false);
    if (!m_gmlog_per_account)
        m_logFiles[LOG_TYPE_COMMAND] = openLogFile("GMLogFile", "GmLogTimestamp", "ab");
    else
    {
        // GM log settings for per account case
        m_gmlog_filename_format = sConfig.GetStringDefault("GMLogFile", "");
        if (!m_gmlog_filename_format.empty())
        {
            bool m_gmlog_timestamp = sConfig.GetBoolDefault("GmLogTimestamp", false);

            size_t dot_pos = m_gmlog_filename_format.find_last_of(".");
            if (dot_pos != m_gmlog_filename_format.npos)
            {
                if (m_gmlog_timestamp)
                    m_gmlog_filename_format.insert(dot_pos, m_logsTimestamp);

                m_gmlog_filename_format.insert(dot_pos, "_#%u");
            }
            else
            {
                m_gmlog_filename_format += "_#%u";

                if (m_gmlog_timestamp)
                    m_gmlog_filename_format += m_logsTimestamp;
            }

            m_gmlog_filename_format = m_logsDir + m_gmlog_filename_format;
        }
    }

    m_logFiles[LOG_TYPE_CHAR]     = openLogFile("CharLogFile", "CharLogTimestamp", "ab");
    m_logFiles[LOG_TYPE_ERROR_DB] = openLogFile("DBErrorLogFile", NULL, "ab");
    m_logFiles[LOG_TYPE_REMOTE]   = openLogFile("RaLogFile", NULL, "ab");
    m_logFiles[LOG_TYPE_CHAT]     = openLogFile("ChatLogFile", "ChatLogTimestamp", "ab");
    m_logFiles[LOG_TYPE_ARENA]    = openLogFile("ArenaLogFile", NULL, "ab");
    m_logFiles[LOG_TYPE_WARDEN]   = openLogFile("Warden.LogFile", NULL, "ab");
    m_logFiles[LOG_TYPE_NETWORK]  = openLogFile("WorldLogFile", NULL, "ab");
    m_logFiles[LOG_TYPE_SQL]      = openLogFile("LogSQLFilename", "LogSQLTimestamp", "ab");

    m_logMask = sConfig.GetIntDefault("LogMask", 51);
    m_logMaskDatabase = sConfig.GetIntDefault("DBLogMask", 0);

    // -------------------------------------------------------------------
    // Deprecated, kept for backward compatibilty - @todo remove in future
    // -------------------------------------------------------------------

    // Main log file settings
    switch (sConfig.GetIntDefault("LogLevel", -1))
    {
        case LOGL_MINIMAL:
            m_logMask = LOG_TYPE_STRING | LOG_TYPE_COMMAND | LOG_TYPE_ERROR | LOG_TYPE_ERROR_DB;
            break;
        case LOGL_BASIC:
            m_logMask = LOG_TYPE_STRING | LOG_TYPE_COMMAND | LOG_TYPE_ERROR | LOG_TYPE_ERROR_DB;
            m_logMask |= LOG_TYPE_BASIC | LOG_TYPE_WARDEN;
            break;
        case LOGL_DETAIL:
            m_logMask = LOG_TYPE_STRING | LOG_TYPE_COMMAND | LOG_TYPE_ERROR | LOG_TYPE_ERROR_DB;
            m_logMask |= LOG_TYPE_BASIC | LOG_TYPE_WARDEN;
            m_logMask |= LOGL_BASIC | LOG_TYPE_DETAIL | LOG_TYPE_SQL | LOG_TYPE_REMOTE | LOG_TYPE_CHAR;
            break;
        case LOGL_DEBUG:
            m_logMask = LOG_TYPE_STRING | LOG_TYPE_COMMAND | LOG_TYPE_ERROR | LOG_TYPE_ERROR_DB;
            m_logMask |= LOG_TYPE_BASIC | LOG_TYPE_WARDEN;
            m_logMask |= LOGL_BASIC | LOG_TYPE_DETAIL | LOG_TYPE_SQL | LOG_TYPE_REMOTE | LOG_TYPE_CHAR;
            m_logMask |= LOGL_DETAIL | LOG_TYPE_DEBUG | LOG_TYPE_MAP | LOG_TYPE_VMAP | LOG_TYPE_MMAP | LOG_TYPE_WARDEN | LOG_TYPE_ARENA | LOG_TYPE_NETWORK;
            break;
        case -1:
            break;
    }

    switch (sConfig.GetIntDefault("DBLogLevel", -1))
    {
        case LOGL_MINIMAL:
            m_logMaskDatabase = LOG_TYPE_STRING | LOG_TYPE_COMMAND | LOG_TYPE_ERROR | LOG_TYPE_ERROR_DB;
            break;
        case LOGL_BASIC:
            m_logMaskDatabase = LOG_TYPE_STRING | LOG_TYPE_COMMAND | LOG_TYPE_ERROR | LOG_TYPE_ERROR_DB;
            m_logMaskDatabase |= LOG_TYPE_BASIC | LOG_TYPE_WARDEN;
            break;
//.........这里部分代码省略.........
开发者ID:gitter-badger,项目名称:OregonCore,代码行数:101,代码来源:Log.cpp


示例10: _ioService

Log::Log() : _ioService(nullptr), _strand(nullptr)
{
    m_logsTimestamp = "_" + GetTimestampStr();
    RegisterAppender<AppenderConsole>();
    RegisterAppender<AppenderFile>();
}
开发者ID:GetPlay,项目名称:335source,代码行数:6,代码来源:Log.cpp


示例11: SetRealmID

void Log::Initialize()
{
    /// Check whether we'll log GM commands/RA events/character outputs/chat stuffs
    m_dbChar = sConfig->GetBoolDefault("LogDB.Char", false);
    m_dbRA = sConfig->GetBoolDefault("LogDB.RA", false);
    m_dbGM = sConfig->GetBoolDefault("LogDB.GM", false);
    m_dbChat = sConfig->GetBoolDefault("LogDB.Chat", false);

    /// Realm must be 0 by default
    SetRealmID(0);

    /// Common log files data
    m_logsDir = sConfig->GetStringDefault("LogsDir","");
    if (!m_logsDir.empty())
        if ((m_logsDir.at(m_logsDir.length() - 1) != '/') && (m_logsDir.at(m_logsDir.length() - 1) != '\\'))
            m_logsDir.append("/");

    m_logsTimestamp = "_" + GetTimestampStr();

    /// Open specific log files
    logfile = openLogFile("LogFile","LogTimestamp","w");
    InitColors(sConfig->GetStringDefault("LogColors", ""));

    m_gmlog_per_account = sConfig->GetBoolDefault("GmLogPerAccount",false);
    if(!m_gmlog_per_account)
        gmLogfile = openLogFile("GMLogFile","GmLogTimestamp","a");
    else
    {
        // GM log settings for per account case
        m_gmlog_filename_format = sConfig->GetStringDefault("GMLogFile", "");
        if(!m_gmlog_filename_format.empty())
        {
            bool m_gmlog_timestamp = sConfig->GetBoolDefault("GmLogTimestamp",false);

            size_t dot_pos = m_gmlog_filename_format.find_last_of(".");
            if(dot_pos!=m_gmlog_filename_format.npos)
            {
                if(m_gmlog_timestamp)
                    m_gmlog_filename_format.insert(dot_pos,m_logsTimestamp);

                m_gmlog_filename_format.insert(dot_pos,"_#%u");
            }
            else
            {
                m_gmlog_filename_format += "_#%u";

                if(m_gmlog_timestamp)
                    m_gmlog_filename_format += m_logsTimestamp;
            }

            m_gmlog_filename_format = m_logsDir + m_gmlog_filename_format;
        }
    }

    charLogfile = openLogFile("CharLogFile", "CharLogTimestamp", "a");
    dberLogfile = openLogFile("DBErrorLogFile", NULL, "a");
    raLogfile = openLogFile("RaLogFile", NULL, "a");
    chatLogfile = openLogFile("ChatLogFile", "ChatLogTimestamp", "a");
    arenaLogFile = openLogFile("ArenaLogFile", NULL,"a");
    sqlLogFile = openLogFile("SQLDriverLogFile", NULL, "a");

    // Main log file settings
    m_logLevel     = sConfig->GetIntDefault("LogLevel", LOGL_NORMAL);
    m_logFileLevel = sConfig->GetIntDefault("LogFileLevel", LOGL_NORMAL);
    m_dbLogLevel   = sConfig->GetIntDefault("DBLogLevel", LOGL_NORMAL);
    m_sqlDriverQueryLogging  = sConfig->GetBoolDefault("SQLDriverQueryLogging", false);

    m_logFilter = 0;

    if(sConfig->GetBoolDefault("LogFilter_TransportMoves", true))
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig->GetBoolDefault("LogFilter_CreatureMoves", true))
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;
    if(sConfig->GetBoolDefault("LogFilter_VisibilityChanges", true))
        m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
    if(sConfig->GetBoolDefault("LogFilter_AchievementUpdates", true))
        m_logFilter |= LOG_FILTER_ACHIEVEMENT_UPDATES;

    // Char log settings
    m_charLog_Dump = sConfig->GetBoolDefault("CharLogDump", false);
    m_charLog_Dump_Separate = sConfig->GetBoolDefault("CharLogDump.Separate", false);
    if (m_charLog_Dump_Separate)
    {
        m_dumpsDir = sConfig->GetStringDefault("CharLogDump.SeparateDir", "");
        if (!m_dumpsDir.empty())
            if ((m_dumpsDir.at(m_dumpsDir.length() - 1) != '/') && (m_dumpsDir.at(m_dumpsDir.length() - 1) != '\\'))
                m_dumpsDir.append("/");
    }
}
开发者ID:thecampster,项目名称:SkyFireEMU,代码行数:89,代码来源:Log.cpp


示例12: GetTimestampStr

void Log::Initialize()
{
    /// Common log files data
    m_logsDir = sConfig.GetStringDefault("LogsDir","");
    if(!m_logsDir.empty())
    {
        if((m_logsDir.at(m_logsDir.length()-1)!='/') && (m_logsDir.at(m_logsDir.length()-1)!='\\'))
            m_logsDir.append("/");
    }

    m_logsTimestamp = "_" + GetTimestampStr();

    /// Open specific log files
    m_gmlog_per_account = sConfig.GetBoolDefault("GmLogPerAccount",false);
    if(!m_gmlog_per_account)
        logFile[LOG_GM] = openLogFile(LOG_GM);
    else
    {
        // GM log settings for per account case
        m_gmlog_filename_format =  sConfig.GetStringDefault(logToStr[LOG_GM][0],"gm_commands.log");
        if(!m_gmlog_filename_format.empty())
        {
            bool m_gmlog_timestamp = sConfig.GetBoolDefault(logToStr[LOG_GM][2],false);

            size_t dot_pos = m_gmlog_filename_format.find_last_of(".");
            if(dot_pos!=m_gmlog_filename_format.npos)
            {
                if(m_gmlog_timestamp)
                    m_gmlog_filename_format.insert(dot_pos,m_logsTimestamp);

                m_gmlog_filename_format.insert(dot_pos,"_%u");
            }
            else
            {
                m_gmlog_filename_format += "__%u";

                if(m_gmlog_timestamp)
                    m_gmlog_filename_format += m_logsTimestamp;
            }

            m_gmlog_filename_format = (m_logsDir.empty() ? "" : m_logsDir + m_gmlog_filename_format);
        }
    }

    m_whisplog_filename_format = (m_logsDir.empty() ? "." : m_logsDir) + sConfig.GetStringDefault("WhispLogDir", "whisps/") + "whisp_%u_.log";

    for (uint8 i = LOG_DEFAULT; i < LOG_MAX_FILES; ++i)
        logFile[i] = openLogFile(LogNames(i));

    // Main log file settings
    m_includeTime  = sConfig.GetBoolDefault("LogTime", false);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);

    m_logFilter = 0;

    if(sConfig.GetBoolDefault("LogFilter_TransportMoves", true))
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig.GetBoolDefault("LogFilter_CreatureMoves", true))
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;
    if(sConfig.GetBoolDefault("LogFilter_VisibilityChanges", true))
        m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;

}
开发者ID:SilvioDoMine,项目名称:core,代码行数:63,代码来源:Log.cpp


示例13: worker

Log::Log() : worker(NULL)
{
    m_logsTimestamp = "_" + GetTimestampStr();
    LoadFromConfig();
}
开发者ID:Nightprince,项目名称:SkyFire.548,代码行数:5,代码来源:Log.cpp


示例14: SetRealmID

void Log::Initialize()
{
    /// Check whether we'll log GM commands/RA events/character outputs/chat stuffs
    m_dbChar = sConfig->GetBoolDefault("LogDB.Char", false);
    m_dbRA = sConfig->GetBoolDefault("LogDB.RA", false);
    m_dbGM = sConfig->GetBoolDefault("LogDB.GM", false);
    m_dbChat = sConfig->GetBoolDefault("LogDB.Chat", false);

    /// Realm must be 0 by default
    SetRealmID(0);

    /// Common log files data
    m_logsDir = sConfig->GetStringDefault("LogsDir", "");
    if(!m_logsDir.empty())
        if((m_logsDir.at(m_logsDir.length() - 1) != '/') && (m_logsDir.at(m_logsDir.length() - 1) != '\\'))
            m_logsDir.append("/");

    m_logsTimestamp = "_" + GetTimestampStr();

    /// Open specific log files
    logfile = openLogFile("LogFile", "LogTimestamp", "w");
    InitColors(sConfig->GetStringDefault("LogColors", ""));

    m_gmlog_per_account = sConfig->GetBoolDefault("GmLogPerAccount", false);
    if(!m_gmlog_per_account)
        gmLogfile = openLogFile("GMLogFile", "GmLogTimestamp", "a");
    else
    {
        // GM log settings for per account case
        m_gmlog_filename_format = sConfig->GetStringDefault("GMLogFile", "");
        if(!m_gmlog_filename_format.empty())
        {
            bool m_gmlog_timestamp = sConfig->GetBoolDefault("GmLogTimestamp", false);

            size_t dot_pos = m_gmlog_filename_format.find_last_of(".");
            if(dot_pos!=m_gmlog_filename_format.npos)
            {
                if(m_gmlog_timestamp)
                    m_gmlog_filename_format.insert(dot_pos, m_logsTimestamp);

                m_gmlog_filename_format.insert(dot_pos, "_#%u");
            }
            else
            {
                m_gmlog_filename_format += "_#%u";

                if(m_gmlog_timestamp)
                    m_gmlog_filename_format += m_logsTimestamp;
            }

            m_gmlog_filename_format = m_logsDir + m_gmlog_filename_format;
        }
    }

    charLogfile     = openLogFile("CharLogFile", "CharLogTimestamp", "a");
    dberLogfile     = openLogFile("DBErrorLogFile", NULL, "a");
    raLogfile       = openLogFile("RASOAP", NULL, "a");
    chatLogfile     = openLogFile("ChatLogFile", "ChatLogTimestamp", "a");
    arenaLogFile    = openLogFile("ArenaLogFile", NULL, "a");
    sqlLogFile      = openLogFile("SQLDriverLogFile", NULL, "a");
    sqlDevLogFile   = openLogFile("SQLDeveloperLogFile", NULL, "a");
    wardenLogFile   = openLogFile("WardenLogFile", NULL, "a");

    // Main log file settings
    m_logLevel     = sConfig->GetIntDefault("LogLevel", LOGL_NORMAL);
    m_logFileLevel = sConfig->GetIntDefault("LogFileLevel", LOGL_NORMAL);
    m_dbLogLevel   = sConfig->GetIntDefault("DBLogLevel", LOGL_NORMAL);
    m_sqlDriverQueryLogging  = sConfig->GetBoolDefault("SQLDriverQueryLogging", false);

    m_DebugLogMask = DebugLogFilters(sConfig->GetIntDefault("DebugLogMask", LOG_FILTER_NONE));

    // Char log settings
    m_charLog_Dump = sConfig->GetBoolDefault("CharLogDump", false);
    m_charLog_Dump_Separate = sConfig->GetBoolDefault("CharLogDump.Separate", false);
    if(m_charLog_Dump_Separate)
    {
        m_dumpsDir = sConfig->GetStringDefault("CharLogDump.SeparateDir", "");
        if(!m_dumpsDir.empty())
            if((m_dumpsDir.at(m_dumpsDir.length() - 1) != '/') && (m_dumpsDir.at(m_dumpsDir.length() - 1) != '\\'))
                m_dumpsDir.append("/");
    }
}
开发者ID:GlassFace,项目名称:MythCore,代码行数:82,代码来源:Log.cpp


示例15: _ioService

Log::Log() : _ioService(nullptr), _strand(nullptr)
{
    m_logsTimestamp = "_" + GetTimestampStr();
    LoadFromConfig();
}
开发者ID:Kittnz,项目名称:FoxEmu,代码行数:5,代码来源:Log.cpp



注:本文中的GetTimestampStr函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetTitle函数代码示例发布时间:2022-05-30
下一篇:
C++ GetTimeZoneInformation函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap