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


C++ LOG3函数代码示例

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


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


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