本文整理汇总了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...");
}
示例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"));
};
示例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");
}
}
示例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);
}
示例5: SetUpTestCase
static void SetUpTestCase() {
logManager.BeginLogging("//stdout", HLOG_ALL);
}
示例6: SetUpTestCase
static void SetUpTestCase() {
logManager.BeginLogging("//stderr");
}
示例7: SetUpTestCase
static void SetUpTestCase()
{
logManager.BeginLogging("//stdout");
logManager.SetLogMask("//stdout", HLOG_ALL);
hlog(HLOG_DEBUG, "Starting test...");
}