当前位置: 首页>>代码示例>>C++>>正文


C++ LogManager::BeginLogging方法代码示例

本文整理汇总了C++中LogManager::BeginLogging方法的典型用法代码示例。如果您正苦于以下问题:C++ LogManager::BeginLogging方法的具体用法?C++ LogManager::BeginLogging怎么用?C++ LogManager::BeginLogging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LogManager的用法示例。


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

示例1: SetUpTestCase

 static void SetUpTestCase() {
     logManager.BeginLogging(__FILE__ ".log", HLOG_ALL);
     logManager.BeginLogging("//stderr",
                             logManager.GetSingleLevelFromString("UPTO_DEBUG"),
                             HLOG_FORMAT_SIMPLE | HLOG_FORMAT_THREAD);
     hlog(HLOG_DEBUG, "Starting test...");
 }
开发者ID:whitepa,项目名称:Forte,代码行数:7,代码来源:PDUPeerEndpointFDUnitTest.cpp

示例2: SetUpTestCase

    static void SetUpTestCase() {
        signal(SIGPIPE, SIG_IGN);

        logManager.BeginLogging(__FILE__ ".log", HLOG_ALL);
        logManager.BeginLogging("//stderr",
                                logManager.GetSingleLevelFromString("UPTO_DEBUG"),
                                HLOG_FORMAT_SIMPLE | HLOG_FORMAT_THREAD);

        //logManager.SetLogMask("//stdout", HLOG_ALL);
        //logManager.BeginLogging("//stdout");

        FileSystemImpl fs;
        mProcMonLocation.Format("FORTE_PROCMON=%s/procmon",
                                getParentTargetDir(fs).c_str());

        hlog(HLOG_INFO, "procmon location : %s", mProcMonLocation.c_str());
        putenv((char *)mProcMonLocation.c_str());
        hlog(HLOG_INFO, "procmon env : %s", getenv("FORTE_PROCMON"));
    };
开发者ID:whitepa,项目名称:Forte,代码行数:19,代码来源:ProcessManagerUnitTest.cpp

示例3: SetUpTestCase

    static void SetUpTestCase() {
        logManager.BeginLogging("//stdout", HLOG_ALL);

        FileSystemImpl fs;

        if (fs.FileExists("/fsscale0/lock"))
        {
            InterProcessLock::LOCK_PATH = "/fsscale0/lock";
        }
        else
        {
            InterProcessLock::LOCK_PATH = "./lock";
            fs.MakeDir("./lock");
        }
    }
开发者ID:whitepa,项目名称:Forte,代码行数:15,代码来源:InterProcessLockOnBoxTest.cpp

示例4: iterations

//TODO: mvoe this onbox. it's a baseline perf number for what
//PDUPeerEndpointFD needs to do
TEST_F(PDUPeerEndpointFDUnitTest,
       DISABLED_WillReadWritePDUsAsLongAsThereIsRoom)
{
    logManager.EndLogging(__FILE__ ".log");

    setupDefaultFDPair();

    TimerClock c;
    c.Start();
    const int iterations(1000);
    int totalIO(0);
    Forte::PDU out;
    Forte::PDUPtr pdu = makeTestPDU();

    for (int i=0; i<iterations; ++i)
    {
        while (mEndpoint2->RecvPDU(out))
        {
            ASSERT_EQ(*pdu, out);
            ++totalIO;
        }

        try
        {
            while (true)
            {
                mPDUQueue1->EnqueuePDU(pdu);
                ++totalIO;
            }
        }
        catch (EPDUQueueFull& e)
        {
        }
    }

    c.Stop();
    hlogstream(HLOG_INFO,
               iterations << " iterations took " << c.GetTime()
               << " and processed " << totalIO);

    //memmove impl baseline on laptop with ASSERT_EQ commented out
    //1000 iterations took 58.369622753 and processed 1003371

    teardownDefaultFDPair();

    logManager.BeginLogging(__FILE__ ".log", HLOG_ALL);
}
开发者ID:whitepa,项目名称:Forte,代码行数:49,代码来源:PDUPeerEndpointFDUnitTest.cpp

示例5: SetUpTestCase

 static void SetUpTestCase() {
     logManager.BeginLogging("//stdout", HLOG_ALL);
 }
开发者ID:whitepa,项目名称:Forte,代码行数:3,代码来源:SCSIUtilUnitTest.cpp

示例6: SetUpTestCase

 static void SetUpTestCase() {
     logManager.BeginLogging("//stderr");
 }
开发者ID:whitepa,项目名称:Forte,代码行数:3,代码来源:IOManagerUnitTest.cpp

示例7: SetUpTestCase

 static void SetUpTestCase()
 {
     logManager.BeginLogging("//stdout");
     logManager.SetLogMask("//stdout", HLOG_ALL);
     hlog(HLOG_DEBUG, "Starting test...");
 }
开发者ID:whitepa,项目名称:Forte,代码行数:6,代码来源:FStringUnitTest.cpp


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