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

C++ LOG3函数代码示例

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

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



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

示例1: LOG3

void
Http2PushedStream::AdjustInitialWindow()
{
  LOG3(("Http2PushStream %p 0x%X AdjustInitialWindow", this, mStreamID));
  if (mConsumerStream) {
    LOG3(("Http2PushStream::AdjustInitialWindow %p 0x%X "
          "calling super consumer %p 0x%X\n", this,
          mStreamID, mConsumerStream, mConsumerStream->StreamID()));
    Http2Stream::AdjustInitialWindow();
    // Http2PushedStream::ReadSegments is needed to call TransmitFrame()
    // and actually get this information into the session bytestream
    mSession->TransactionHasDataToWrite(this);
  }
  // Otherwise, when we get hooked up, the initial window will get bumped
  // anyway, so we're good to go.
}
开发者ID:MekliCZ,项目名称:positron,代码行数:16,代码来源:Http2Push.cpp


示例2: LOG3

UINT8 sc499_device::dack_read() {
	UINT8 data = 0xff;

//  set_dma_drq(CLEAR_LINE);

	if (m_ctape_block_index >= SC499_CTAPE_BLOCK_SIZE)
	{
		LOG3(("dack_read: read_block"));
		read_block();
		m_nasty_readahead++;

		if (block_is_filemark())
		{
			set_dma_drq(CLEAR_LINE);
			m_status &= ~SC499_STAT_EXC;
			m_status &= ~SC499_STAT_DIR;
		}
	}

	data = m_ctape_block_buffer[m_ctape_block_index++];
	if (m_ctape_block_index < 2 || m_ctape_block_index > 511)
	{
		LOG2(("dack_read: data[%d]=%x status=%x",  m_ctape_block_index-1, data, m_status));
	}

//  if (m_ctape_block_index < SC499_CTAPE_BLOCK_SIZE)
//  {
//      set_dma_drq(ASSERT_LINE);
//  }

	return data;
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:32,代码来源:sc499.c


示例3: openSocket

int openSocket(const int port, const char * peer) {
    int fd,res,opt;
    struct sockaddr_in addr;
    socklen_t addrlen;
#ifndef DONT_USE_GETHOSTBYNAME    
    struct hostent *he;
#endif    
    if (daveDebug & daveDebugOpen) {
	LOG1(ThisModule "enter OpenSocket");
	FLUSH;
    }
    addr.sin_family = AF_INET;
    addr.sin_port =htons(port);
//	(((port) & 0xff) << 8) | (((port) & 0xff00) >> 8);
#ifndef DONT_USE_GETHOSTBYNAME
    he = gethostbyname(peer);
    if (!he) return 0;  // bug reported by Nick Hibma
    memcpy(&addr.sin_addr, he->h_addr_list[0], sizeof(addr.sin_addr));
#else
    inet_aton(peer, &addr.sin_addr);
#endif

    fd = socket(AF_INET, SOCK_STREAM, 0);
    if (daveDebug & daveDebugOpen) {
	LOG2(ThisModule "OpenSocket: socket is %d\n", fd);
    }	
    
    addrlen = sizeof(addr);
    if (connect(fd, (struct sockaddr *) & addr, addrlen)) {
	LOG2(ThisModule "Socket error: %s \n", strerror(errno));
	close(fd);
	fd = 0;
    } else {
	if (daveDebug & daveDebugOpen) {
	    LOG2(ThisModule "Connected to host: %s \n", peer);
	}    
/*
	Need this, so we can read a packet with a single read call and make
	read return if there are too few bytes.
*/	
	errno=0;
//	res=fcntl(fd, F_SETFL, O_NONBLOCK);
//	if (daveDebug & daveDebugOpen) 
//	    LOG3(ThisModule "Set mode to O_NONBLOCK %s %d\n", strerror(errno),res);
/*
	I thought this might solve Marc's problem with the CP closing
	a connection after 30 seconds or so, but the Standrad keepalive time
	on my box is 7200 seconds.	    
*/	
	errno=0;
	opt=1;
	res=setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &opt, 4);
	if (daveDebug & daveDebugOpen) {	
	    LOG3(ThisModule "setsockopt %s %d\n", strerror(errno),res);	
	}    
    }	
    FLUSH;
    return fd;
}
开发者ID:EtherGraf,项目名称:libnodave,代码行数:59,代码来源:openSocket.c


示例4: LOG3

void
SpdyStream::ChangeState(enum stateType newState)
{
  LOG3(("SpdyStream::ChangeState() %p from %X to %X",
        this, mUpstreamState, newState));
  mUpstreamState = newState;
  return;
}
开发者ID:krellian,项目名称:mozilla-central,代码行数:8,代码来源:SpdyStream.cpp


示例5: LOG3

void CVwsSession::CancelRequestViewEvent()
	{
	LOG3(CVwsLog::ENormal,_L("Client \"%x\" requested cancelation of view event request"),iAppUid.iUid);
	if (iState==EClientRequestPending)
		{
		CompleteViewEvent(KErrCancel);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:8,代码来源:VWSSESSN.CPP


示例6: StructTypeReplacement

void NestedStructMap::createReplacement(const IR::Type_Struct* type) {
    auto repl = ::get(replacement, type);
    if (repl != nullptr)
        return;
    repl = new StructTypeReplacement(typeMap, type);
    LOG3("Replacement for " << type << " is " << repl);
    replacement.emplace(type, repl);
}
开发者ID:ederollora,项目名称:p4c,代码行数:8,代码来源:flattenInterfaceStructs.cpp


示例7: LOG1

const IR::Node* DoRemoveActionParameters::postorder(IR::P4Action* action) {
    LOG1("Visiting " << dbp(action));
    BUG_CHECK(getParent<IR::P4Control>() || getParent<IR::P4Program>(),
              "%1%: unexpected parent %2%", getOriginal(), getContext()->node);
    auto result = new IR::IndexedVector<IR::Declaration>();
    auto leftParams = new IR::IndexedVector<IR::Parameter>();
    auto initializers = new IR::IndexedVector<IR::StatOrDecl>();
    auto postamble = new IR::IndexedVector<IR::StatOrDecl>();
    auto invocation = invocations->get(getOriginal<IR::P4Action>());
    if (invocation == nullptr)
        return action;
    auto args = invocation->arguments;

    ParameterSubstitution substitution;
    substitution.populate(action->parameters, args);

    bool removeAll = invocations->removeAllParameters(getOriginal<IR::P4Action>());
    for (auto p : action->parameters->parameters) {
        if (p->direction == IR::Direction::None && !removeAll) {
            leftParams->push_back(p);
        } else {
            auto decl = new IR::Declaration_Variable(p->srcInfo, p->name,
                                                     p->annotations, p->type, nullptr);
            LOG3("Added declaration " << decl << " annotations " << p->annotations);
            result->push_back(decl);
            auto arg = substitution.lookup(p);
            if (arg == nullptr) {
                ::error("action %1%: parameter %2% must be bound", invocation, p);
                continue;
            }

            if (p->direction == IR::Direction::In ||
                p->direction == IR::Direction::InOut ||
                p->direction == IR::Direction::None) {
                auto left = new IR::PathExpression(p->name);
                auto assign = new IR::AssignmentStatement(arg->srcInfo, left, arg->expression);
                initializers->push_back(assign);
            }
            if (p->direction == IR::Direction::Out ||
                p->direction == IR::Direction::InOut) {
                auto right = new IR::PathExpression(p->name);
                auto assign = new IR::AssignmentStatement(arg->srcInfo, arg->expression, right);
                postamble->push_back(assign);
            }
        }
    }
    if (result->empty())
        return action;

    initializers->append(action->body->components);
    initializers->append(*postamble);

    action->parameters = new IR::ParameterList(action->parameters->srcInfo, *leftParams);
    action->body = new IR::BlockStatement(action->body->srcInfo, *initializers);
    LOG1("To replace " << dbp(action));
    result->push_back(action);
    return result;
}
开发者ID:ederollora,项目名称:p4c,代码行数:58,代码来源:removeParameters.cpp


示例8: LOG3

void
Http2BaseCompressor::UpdateReferenceSet(int32_t delta)
{
  if (!delta)
    return;

  uint32_t headerTableSize = mHeaderTable.VariableLength();
  uint32_t oldHeaderTableSize = headerTableSize + delta;

  for (int32_t i = mReferenceSet.Length() - 1; i >= 0; --i) {
    uint32_t indexRef = mReferenceSet[i];
    if (indexRef >= headerTableSize) {
      if (indexRef < oldHeaderTableSize) {
        // This one got dropped
        LOG3(("HTTP base compressor reference to index %u removed.\n",
              indexRef));
        mReferenceSet.RemoveElementAt(i);
      } else {
        // This pointed to the static table, need to adjust
        uint32_t newRef = indexRef - delta;
        LOG3(("HTTP base compressor reference to index %u changed to %d (%s)\n",
              mReferenceSet[i], newRef, mHeaderTable[newRef]->mName.get()));
        mReferenceSet[i] = newRef;
      }
    }
  }

  for (int32_t i = mAlternateReferenceSet.Length() - 1; i >= 0; --i) {
    uint32_t indexRef = mAlternateReferenceSet[i];
    if (indexRef >= headerTableSize) {
      if (indexRef < oldHeaderTableSize) {
        // This one got dropped
        LOG3(("HTTP base compressor new reference to index %u removed.\n",
              indexRef));
        mAlternateReferenceSet.RemoveElementAt(i);
      } else {
        // This pointed to the static table, need to adjust
        uint32_t newRef = indexRef - delta;
        LOG3(("HTTP base compressor new reference to index %u changed to %d (%s)\n",
              mAlternateReferenceSet[i], newRef, mHeaderTable[newRef]->mName.get()));
        mAlternateReferenceSet[i] = newRef;
      }
    }
  }
}
开发者ID:cbrem,项目名称:gecko-dev,代码行数:45,代码来源:Http2Compression.cpp


示例9: DefineProperty

// -----------------------------------------------------------------------------
// Helper function to define a property and log result
// -----------------------------------------------------------------------------
//
TInt DefineProperty(TUid aCategory, TUint aKey, TInt aAttr,
    const TSecurityPolicy & aReadPolicy, const TSecurityPolicy& aWritePolicy)
    {
    TInt err = RProperty::Define( aCategory, aKey, aAttr, aReadPolicy, aWritePolicy );
    LOG3( SIMPLE, 
        "SATSYSTEMSTATE: CSatSystemState::ConstructL: property %d defined, err=%d",
        aKey, err);
    return err;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:13,代码来源:CSatSystemState.cpp


示例10: switch

nsresult
Http2PushedStream::ReadSegments(nsAHttpSegmentReader *reader,
                                uint32_t, uint32_t *count)
{
  nsresult rv = NS_OK;
  *count = 0;

  switch (mUpstreamState) {
  case GENERATING_HEADERS:
    // The request headers for this has been processed, so we need to verify
    // that :authority, :scheme, and :path MUST be present. :method MUST NOT be
    // present
    CreatePushHashKey(mHeaderScheme, mHeaderHost,
                      mSession->Serial(), mHeaderPath,
                      mOrigin, mHashKey);

    LOG3(("Http2PushStream 0x%X hash key %s\n", mStreamID, mHashKey.get()));

    // the write side of a pushed transaction just involves manipulating a little state
    SetSentFin(true);
    Http2Stream::mRequestHeadersDone = 1;
    Http2Stream::mOpenGenerated = 1;
    Http2Stream::ChangeState(UPSTREAM_COMPLETE);
    break;

  case UPSTREAM_COMPLETE:
    // Let's just clear the stream's transmit buffer by pushing it into
    // the session. This is probably a window adjustment.
    LOG3(("Http2Push::ReadSegments 0x%X \n", mStreamID));
    mSegmentReader = reader;
    rv = TransmitFrame(nullptr, nullptr, true);
    mSegmentReader = nullptr;
    break;

  case GENERATING_BODY:
  case SENDING_BODY:
  case SENDING_FIN_STREAM:
  default:
    break;
  }

  return rv;
}
开发者ID:MekliCZ,项目名称:positron,代码行数:43,代码来源:Http2Push.cpp


示例11: memcmp

int sc499_device::block_is_filemark()
{
	static const UINT8 fm_pattern[] = {0xDE, 0xAF, 0xFA, 0xED};

	int is_filemark = memcmp(m_ctape_block_buffer, fm_pattern, 4) == 0 &&
			memcmp(m_ctape_block_buffer, m_ctape_block_buffer+4, SC499_CTAPE_BLOCK_SIZE-4) == 0;

	LOG3(("block_is_filemark for block %d = %d", m_tape_pos-1, is_filemark));
	return is_filemark;
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:10,代码来源:sc499.c


示例12: LOG3

Http2PushedStream *
SpdyPushCache::RemovePushedStreamHttp2(nsCString key)
{
  Http2PushedStream *rv = mHashHttp2.Get(key);
  LOG3(("SpdyPushCache::RemovePushedStreamHttp2 %s 0x%X\n",
        key.get(), rv ? rv->StreamID() : 0));
  if (rv)
    mHashHttp2.Remove(key);
  return rv;
}
开发者ID:jrmuizel,项目名称:mozilla-central-skia,代码行数:10,代码来源:ASpdySession.cpp


示例13: __sdriq_connect

static int
__sdriq_connect (sdriq_t *sdriq)
{
	if (unlikely(sdriq == NULL))
		LOG_ERROR_AND_RETURN(-1, "null sdriq_t");
	
	LOG3("[%s]", sdriq->device.desc.name);
	
	return 0;
}
开发者ID:senojsitruc,项目名称:Static,代码行数:10,代码来源:sdriq.c


示例14: LOG3

SpdyPushedStream31 *
SpdyPushCache::RemovePushedStreamSpdy31(nsCString key)
{
  SpdyPushedStream31 *rv = mHashSpdy31.Get(key);
  LOG3(("SpdyPushCache::RemovePushedStream %s 0x%X\n",
        key.get(), rv ? rv->StreamID() : 0));
  if (rv)
    mHashSpdy31.Remove(key);
  return rv;
}
开发者ID:captainbrosset,项目名称:gecko-dev,代码行数:10,代码来源:ASpdySession.cpp


示例15: LOG3

const IR::Node* ReplaceStructs::preorder(IR::P4Control* control) {
    for (auto p : control->getApplyParameters()->parameters) {
        auto pt = replacementMap->typeMap->getType(p, true);
        auto repl = replacementMap->getReplacement(pt);
        if (repl != nullptr) {
            toReplace.emplace(p, repl);
            LOG3("Replacing parameter " << dbp(p) << " of " << dbp(control));
        }
    }
    return control;
}
开发者ID:ederollora,项目名称:p4c,代码行数:11,代码来源:flattenInterfaceStructs.cpp


示例16: ASSERT

void CVwsSession::CompleteViewEventL(TInt aNotification,const TVwsViewEvent& aEvent)
	{
	ASSERT(iState==EClientRequestPending);

	if (aNotification==KErrNone && iState==EClientRequestPending)
		{
		LOG3(CVwsLog::ENormal,_L("Writing view event buffer to client \"%x\""),iAppUid.iUid);
		iViewEventMessage.WriteL(0,TPckgC<TVwsViewEvent>(aEvent));
		}
	CompleteViewEvent(aNotification);
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:11,代码来源:VWSSESSN.CPP


示例17: LOG3

const IR::Node* DoReplaceTuples::insertReplacements(const IR::Node* before) {
    // Check that we are in the top-level P4Program list of declarations.
    if (!getParent<IR::P4Program>())
        return before;

    auto result = repl->getNewReplacements();
    if (result == nullptr)
        return before;
    LOG3("Inserting replacements before " << dbp(before));
    result->push_back(before);
    return result;
}
开发者ID:ederollora,项目名称:p4c,代码行数:12,代码来源:eliminateTuples.cpp


示例18: convertType

const IR::Type* ReplacementMap::convertType(const IR::Type* type) {
    auto it = replacement.find(type);
    if (it != replacement.end())
        return it->second;
    if (type->is<IR::Type_Struct>()) {
        auto st = type->to<IR::Type_Struct>();
        bool changes = false;
        IR::IndexedVector<IR::StructField> fields;
        for (auto f : st->fields) {
            auto ftype = typeMap->getType(f);
            auto cftype = convertType(ftype);
            if (cftype != ftype)
                changes = true;
            auto field = new IR::StructField(f->name, f->annotations, cftype->getP4Type());
            fields.push_back(field);
        }
        if (changes) {
            auto result = new IR::Type_Struct(st->srcInfo, st->name, st->annotations, fields);
            LOG3("Converted " << dbp(type) << " to " << dbp(result));
            replacement.emplace(type, result);
            return result;
        } else {
            return type;
        }
    } else if (type->is<IR::Type_Tuple>()) {
        cstring name = ng->newName("tuple");
        IR::IndexedVector<IR::StructField> fields;
        for (auto t : type->to<IR::Type_Tuple>()->components) {
            auto ftype = convertType(t);
            auto fname = ng->newName("field");
            auto field = new IR::StructField(IR::ID(fname), ftype->getP4Type());
            fields.push_back(field);
        }
        auto result = new IR::Type_Struct(name, fields);
        LOG3("Converted " << dbp(type) << " to " << dbp(result));
        replacement.emplace(type, result);
        return result;
    }
    return type;
}
开发者ID:ederollora,项目名称:p4c,代码行数:40,代码来源:eliminateTuples.cpp


示例19: while

nsresult
Http2Decompressor::DecodeHeaderBlock(const uint8_t *data, uint32_t datalen,
                                     nsACString &output)
{
  mAlternateReferenceSet.Clear();
  mOffset = 0;
  mData = data;
  mDataLen = datalen;
  mOutput = &output;
  mOutput->Truncate();
  mHeaderStatus.Truncate();
  mHeaderHost.Truncate();
  mHeaderScheme.Truncate();
  mHeaderPath.Truncate();
  mHeaderMethod.Truncate();

  nsresult rv = NS_OK;
  while (NS_SUCCEEDED(rv) && (mOffset < datalen)) {
    if (mData[mOffset] & 0x80) {
      rv = DoIndexed();
    } else if (mData[mOffset] & 0x40) {
      rv = DoLiteralWithIncremental();
    } else if (mData[mOffset] & 0x20) {
      rv = DoContextUpdate();
    } else if (mData[mOffset] & 0x10) {
      rv = DoLiteralNeverIndexed();
    } else {
      rv = DoLiteralWithoutIndex();
    }
  }

  // after processing the input the decompressor comapres the alternate
  // set to the inherited reference set and generates headers for
  // anything implicit in reference - alternate.

  uint32_t setLen = mReferenceSet.Length();
  for (uint32_t index = 0; index < setLen; ++index) {
    if (!mAlternateReferenceSet.Contains(mReferenceSet[index])) {
      LOG3(("HTTP decompressor carryover in reference set with index %u %s %s\n",
            mReferenceSet[index],
            mHeaderTable[mReferenceSet[index]]->mName.get(),
            mHeaderTable[mReferenceSet[index]]->mValue.get()));
      OutputHeader(mReferenceSet[index]);
    }
  }

  mAlternateReferenceSet.Clear();
  return rv;
}
开发者ID:cbrem,项目名称:gecko-dev,代码行数:49,代码来源:Http2Compression.cpp


示例20: LogHeaders

static void
LogHeaders(const char *lines)
{
    nsCAutoString buf;
    char *p;
    while ((p = PL_strstr(lines, "\r\n")) != nsnull) {
        buf.Assign(lines, p - lines);
        if (PL_strcasestr(buf.get(), "authorization: ") != nsnull) {
            char *p = PL_strchr(PL_strchr(buf.get(), ' ')+1, ' ');
            while (*++p) *p = '*';
        }
        LOG3(("  %s\n", buf.get()));
        lines = p + 2;
    }
}
开发者ID:amyvmiwei,项目名称:firefox,代码行数:15,代码来源:nsHttpTransaction.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ LOG4CPLUS_DEBUG函数代码示例发布时间:2022-05-30
下一篇:
C++ LOG2函数代码示例发布时间: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