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


C++ LOG4CPLUS_DEBUG函数代码示例

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


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

示例1: LOG4CPLUS_DEBUG

HRESULT CTongshiDVBSourceStream::DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pRequest) 
{
  LOG4CPLUS_DEBUG(logger, "CTongshiDVBSourceStream::DecideBufferSize()");
  HRESULT hr;
  CAutoLock cAutoLock(m_pFilter->pStateLock());

  CheckPointer(pAlloc, E_POINTER);
  CheckPointer(pRequest, E_POINTER);

  // If the bitmap file was not loaded, just fail here.

  // Ensure a minimum number of buffers
  if (pRequest->cBuffers == 0)
  {
    pRequest->cBuffers = 1;
  }
  pRequest->cbBuffer = MAX_BUFFER_SIZE;

  ALLOCATOR_PROPERTIES Actual;
  hr = pAlloc->SetProperties(pRequest, &Actual);
  if (FAILED(hr)) 
  {
    return hr;
  }

  // Is this allocator unsuitable?
  if (Actual.cbBuffer < pRequest->cbBuffer) 
  {
    return E_FAIL;
  }
  LOG4CPLUS_DEBUG(logger, "CTongshiDVBSourceStream::DecideBufferSize() - finished");

  return S_OK;
}
开发者ID:MisterD81,项目名称:SourceFilters,代码行数:34,代码来源:tongshidvbsource.cpp

示例2: cObjectLock

//
// Stop
//
// Overriden to close the dump file
//
STDMETHODIMP CNetworkProviderFilter::Stop()
{
	CAutoLock cObjectLock(m_pLock);
	LOG4CPLUS_DEBUG(logger,"CNetworkProviderFilter::Stop()");
	HRESULT result =  CBaseFilter::Stop();
	LOG4CPLUS_DEBUG(logger,"CNetworkProviderFilter::Stop() completed");
	return result;
}
开发者ID:MisterD81,项目名称:SourceFilters,代码行数:13,代码来源:NetworkProvider.cpp

示例3: LOG4CPLUS_DEBUG

//
// Pause
//
// Overriden to open the dump file
//
STDMETHODIMP CNetworkProviderFilter::Pause()
{
	LOG4CPLUS_DEBUG(logger,"CNetworkProviderFilter::Pause()");
	CAutoLock cObjectLock(m_pLock);
	if (m_pNetworkProvider != NULL){
	}
	LOG4CPLUS_DEBUG(logger,"CNetworkProviderFilter::Pause() finished");
	return CBaseFilter::Pause();
}
开发者ID:MisterD81,项目名称:SourceFilters,代码行数:14,代码来源:NetworkProvider.cpp

示例4: LOG4CPLUS_DEBUG

void ContentQuotaScheduler::SetActiveMaxCap(const uint32_t p_maxcap)
{
    LOG4CPLUS_DEBUG(g_logger, "ENTER: SetActiveMaxCap--max_active_rid_num: " << max_active_rid_num << " p_maxcap:" << p_maxcap 
        << "active_minute_count: " << active_minute_count );
    max_active_rid_num = p_maxcap;
    active_minute_count = max_active_rid_num;
    LOG4CPLUS_DEBUG(g_logger, "EXIT: SetActiveMaxCap--max_active_rid_num: " << max_active_rid_num << " p_maxcap:" << p_maxcap 
        << "active_minute_count: " << active_minute_count );
}
开发者ID:huangyt,项目名称:MyProjects,代码行数:9,代码来源:content_quota_scheduler.cpp

示例5: ForwardString

	static void ForwardString(log4cplus::Logger &app_instance,
		LogLevel log_level, const char *out_string) {
		if (out_string == NULL)
			out_string = "";
#ifdef _Windows
# pragma warning(push)
# pragma warning(disable:4127)
#endif // #ifdef _Windows
		switch (log_level) {
			case LogLevel_Literal   :
				LOG4CPLUS_TRACE(app_instance, out_string);
				break;
			case LogLevel_Spam      :
				LOG4CPLUS_TRACE(app_instance, out_string);
				break;
			case LogLevel_Minutiae  :
				LOG4CPLUS_TRACE(app_instance, out_string);
				break;
			case LogLevel_Debug     :
				LOG4CPLUS_DEBUG(app_instance, out_string);
				break;
			case LogLevel_Detail    :
				LOG4CPLUS_DEBUG(app_instance, out_string);
				break;
			case LogLevel_Info      :
				LOG4CPLUS_INFO(app_instance, out_string);
				break;
			case LogLevel_Notice    :
				LOG4CPLUS_WARN(app_instance, out_string);
				break;
			case LogLevel_Warning   :
				LOG4CPLUS_WARN(app_instance, out_string);
				break;
			case LogLevel_Error     :
				LOG4CPLUS_ERROR(app_instance, out_string);
				break;
			case LogLevel_Critical  :
				LOG4CPLUS_ERROR(app_instance, out_string);
				break;
			case LogLevel_Alert     :
				LOG4CPLUS_ERROR(app_instance, out_string);
				break;
			case LogLevel_Emergency :
				LOG4CPLUS_ERROR(app_instance, out_string);
				break;
			case LogLevel_Fatal     :
				LOG4CPLUS_FATAL(app_instance, out_string);
				break;
			default						:
				LOG4CPLUS_ERROR(app_instance, out_string);
				break;
#ifdef _Windows
# pragma warning(pop)
#endif // #ifdef _Windows
		}
	}
开发者ID:neilgroves,项目名称:MlbDev,代码行数:56,代码来源:LogHandlerLog4CPlus.hpp

示例6: getInstance

void RTSPMJPEGClient::threadLoop(RTSPMJPEGClientParameters *parameters)
{
    int clientId = parameters->clientId;

    RTSPMJPEGClient *instance = getInstance();
    RTSPMJPEGClientStruct *pClient = instance->clients[clientId];

    if (pClient == NULL)
    {
        pClient = new RTSPMJPEGClientStruct;

        pClient->clientId = clientId;
        pClient->state = RTSPMJPEGCLIENT_STATE_CLEANED;
        pClient->isWaiting = false;
        pClient->newFramesNum = 0;
        pClient->next = 0;

        for (int i = 0; i < RTSPMJPEGCLIENT_FRAME_QUEUE_LEN; i++)
        {
            pClient->frameQueue[i] = (uint8_t * ) av_malloc(RTSPMJPEGCLIENT_FRAME_BUFFER_SIZE);
            pClient->frameSizes[i] = 0;
        }

        instance->clients[clientId] = pClient;

        LOG4CPLUS_DEBUG(Logger::getInstance(LOG4CPLUS_TEXT(DEFAULT_OUTPUT_LOGGER)), "[CLIENT " << pClient->clientId << "] allocated space for a new client...");
    }

    LOG4CPLUS_TRACE(Logger::getInstance(LOG4CPLUS_TEXT(DEFAULT_OUTPUT_LOGGER)), "[CLIENT " << pClient->clientId << "] threadLoop()...");

    pClient->address = ((RTSPMJPEGClientParameters * ) parameters)->address;

    delete parameters;

    if (instance->_init(pClient) < 0)
    {
        instance->_clean(pClient, RTSPMJPEGCLIENT_STATE_ERROR);
        LOG4CPLUS_ERROR(Logger::getInstance(LOG4CPLUS_TEXT(DEFAULT_ERROR_LOGGER)), "[CLIENT " << pClient->clientId << "] init failed!");
        LOG4CPLUS_ERROR(Logger::getInstance(LOG4CPLUS_TEXT(DEFAULT_OUTPUT_LOGGER)), "[CLIENT " << pClient->clientId << "] init failed!");

        return;
    }

    pClient->state = RTSPMJPEGCLIENT_STATE_LOOPING;

    while (pClient->state == RTSPMJPEGCLIENT_STATE_LOOPING && instance->_readFrame(pClient) == 0)
        LOG4CPLUS_DEBUG(Logger::getInstance(LOG4CPLUS_TEXT(DEFAULT_OUTPUT_LOGGER)), "[CLIENT " << pClient->clientId << "] while()...");

    // set CLEANED only if it was correctly stopped. ERROR otherwise. Don't set
    // any state greater then CLEANED because they're all states indicating an
    // action being taken
    instance->_clean(pClient, pClient->state == RTSPMJPEGCLIENT_STATE_STOPPING ? RTSPMJPEGCLIENT_STATE_CLEANED : RTSPMJPEGCLIENT_STATE_ERROR);
}
开发者ID:qualibit,项目名称:rtspmjpegclient,代码行数:53,代码来源:rtspmjpegclient.cpp

示例7: LOG4CPLUS_INFO

HRESULT CNetworkProvider::RegisterDeviceFilter(IUnknown* pUnkFilterControl,ULONG* ppvRegisitrationContext) {
	RegisterDevice* device;
	FILTER_INFO filterinfo;
	HRESULT hr;
	IBaseFilter* filter;
	LOG4CPLUS_INFO(logger,"RegisterDeviceFilter start");
	IMpeg2Demultiplexer* demux;
	if (m_pNetworkProviderPin->GetConnected() != NULL){
		hr = m_pNetworkProviderPin->CreateOutputPin(m_pNetworkProviderPin->GetConnected());
	}
	CAutoLock lock(&m_Lock);
	if (pUnkFilterControl == NULL){
		return E_POINTER;
	}
	if (&ppvRegisitrationContext == NULL ){
		return E_POINTER;
	}
	hr = pUnkFilterControl->QueryInterface(IID_IBaseFilter, (void**) &filter);
	if (hr != S_OK ){
		return S_FALSE;
	}
	hr = filter->QueryFilterInfo(&filterinfo);
	filterinfo.pGraph = NULL;
	if (hr != S_OK ){
		return S_FALSE;
	}
	LOG4CPLUS_DEBUG(logger,"RegisterDeviceFilter checks finished");
	m_fid = m_fid + 1;
	device = new RegisterDevice();
	device->id = m_fid;
	device->control = filter;
	wcstombs( device->name, filterinfo.achName, sizeof(device->name)); 
	ppvRegisitrationContext = &m_fid;
	hr = pUnkFilterControl->QueryInterface(IID_IMpeg2Demultiplexer, (void**) &demux);
	if (hr == S_OK ){
		LOG4CPLUS_DEBUG(logger,"RegisterDeviceFilter device prepared for registration - Name: "<<device->name<<" - "<<m_fid<<" - "<<&m_fid);
		device->control = NULL;
		delete device;
		LOG4CPLUS_INFO(logger,"RegisterDeviceFilter demux skipped");
		return S_FALSE;
	}else{
		LOG4CPLUS_INFO(logger,"RegisterDeviceFilter device prepared for registration - Name: "<<device->name<<" - "<<m_fid<<" - "<<&m_fid);
		IBDA_DeviceControl* ctrl;
		if( filter->QueryInterface(_uuidof(IBDA_DeviceControl), (void**) &ctrl)==S_OK){
			device->deviceControl=ctrl;
		}
		m_vecDevices.push_back(device);
		CheckCapabilities(filter);
	}
	LOG4CPLUS_DEBUG(logger,"RegisterDeviceFilter finished");
	return S_OK;
}
开发者ID:MisterD81,项目名称:SourceFilters,代码行数:52,代码来源:NetworkProvider.cpp

示例8: sizeof

void KeyPanel::keyThreadReader() {
  Logger logdev = Logger::getInstance(LOGDEVICE);
  this->running = true;
  struct input_event ev;
  int size = sizeof(ev);
  int nread = 0;
  while (running) {
    // blocking event reader
    nread = read(this->fd, &ev, size);
    if (nread != size) {
      LOG4CPLUS_WARN(
          logdev,
          "read size error (s=" << (running ? "true" : "false") << " r="
              << nread << "e=" << size << ")");
      if (running)
        continue;
    }
    if (!running)
      break;
    LOG4CPLUS_TRACE(
        logdev,
        "(" << keyCounter << ") code=" << ev.code << " type=" << ev.type
            << " value=" << ev.value << " s=" << ev.time.tv_sec << " u="
            << ev.time.tv_usec);

    switch (ev.type) {
      case EV_KEY:
        this->key.loadEvent(ev);
        LOG4CPLUS_DEBUG(logdev, "EV_KEY " << string(this->key));
        break;
      case EV_SYN:
        this->key.validateEvent(ev);
        keyCounter++;
        LOG4CPLUS_DEBUG(
            logdev,
            "EV_SYN (" << std::to_string(keyCounter) << string(") ")
                << string(this->key));
        if (this->key.isPressEvent()) {
          keyPressObs(this->key);
        } else {
          keyReleaseObs(this->key);
        }

        if (this->key.isLongEvent()) {
          keyLongPressObs(this->key);
        }
        break;
    }

  }
  LOG4CPLUS_DEBUG(logdev, "KeyPanel thread exit\n");
}
开发者ID:danieleatgithub,项目名称:Homer,代码行数:52,代码来源:KeyPanel.cpp

示例9: key_thread_reader

  /**
   * event reader
   */
  void key_thread_reader() {
    Logger logdev = Logger::getInstance(LOGDEVICE);
    this->running = true;
    struct input_event ev;
    int size = sizeof(ev);
    int nread = 0;
    while (running) {
      // blocking event reader
      nread = read(this->fd, &ev, size);
      if (nread != size) {
        LOG4CPLUS_WARN(
            logdev,
            "read size error (s=" << (running ? "true" : "false") << " r="
                << nread << "e=" << size << ")");
        if (running)
          continue;
      }
      if (!running)
        break;
      LOG4CPLUS_TRACE(
          logdev,
          "(" << key_counter << ") code=" << ev.code << " type=" << ev.type
              << " value=" << ev.value << " s=" << ev.time.tv_sec << " u="
              << ev.time.tv_usec);

      switch (ev.type) {
        case EV_KEY:
          this->key.load_event(ev);
          LOG4CPLUS_DEBUG(logdev, "EV_KEY " << string(this->key));
          break;
        case EV_SYN:
          this->key.validate_event(ev);
          key_counter++;
          //TODO: overload operator << for keybutton
          LOG4CPLUS_DEBUG(logdev, "EV_SYN " << string(this->key));
          if (this->key.isPressEvent()) {
            key_press_obs(this->key);
          } else {
            key_release_obs(this->key);
          }

          if (this->key.isLongEvent()) {
            key_long_obs(this->key);
          }
          break;
      }

    }
    LOG4CPLUS_DEBUG(logdev, "KeyPanel thread exit\n");
  }
开发者ID:danieleatgithub,项目名称:Homer,代码行数:53,代码来源:KeyPanel.hpp

示例10: writeToQueue

bool writeToQueue(std::string jsonResult)
{
  try
  {
    Beanstalk::Client client(BEANSTALK_QUEUE_HOST, BEANSTALK_PORT);
    client.use(BEANSTALK_TUBE_NAME);

    int id = client.put(jsonResult);
    
    if (id <= 0)
    {
      LOG4CPLUS_ERROR(logger, "Failed to write data to queue");
      return false;
    }
    
    LOG4CPLUS_DEBUG(logger, "put job id: " << id );

  }
  catch (const std::runtime_error& error)
  {
    LOG4CPLUS_WARN(logger, "Error connecting to Beanstalk.  Result has not been saved.");
    return false;
  }
  return true;
}
开发者ID:Simage,项目名称:openalpr,代码行数:25,代码来源:daemon.cpp

示例11: start

  int start() {
    Logger logdev = Logger::getInstance(LOGDEVICE);

    if (running || event_dev.empty()) {
      LOG4CPLUS_ERROR(
          logdev,
          (running ? "Already running" : "")
              << (event_dev.empty() ? "No event device" : "") << endl);
      return (-1);
    }

    if ((fd = open(this->event_dev.c_str(), O_RDONLY)) < 0) {
      LOG4CPLUS_ERROR(
          logdev,
          __PRETTY_FUNCTION__
              << (string("unable to open ") + this->event_dev
                  + string(strerror(errno))).c_str());
      throw std::runtime_error(
          (string("unable to open ") + this->event_dev + string(strerror(errno)))
              .c_str());
    }
    this->key_thread = std::thread([&] {KeyPanel::key_thread_reader();});
    LOG4CPLUS_DEBUG(logdev, "key reader started");
    return (0);
  }
开发者ID:danieleatgithub,项目名称:Homer,代码行数:25,代码来源:KeyPanel.hpp

示例12: lock

STDMETHODIMP CTongshiDVBSource::DeactivateCard () {
  CAutoLock lock(&m_Lock);
  LOG4CPLUS_DEBUG(logger,"CTongshiDVBSource::DeactivateCard");
  try{
    if(m_cardHandle==NULL){
      LOG4CPLUS_DEBUG(logger,"CTongshiDVBSource::DeactivateCard - no card handle available");
      return S_FALSE;
    }
    TSDVB_CloseDevice(m_cardHandle);
    m_cardHandle = NULL;
  }catch(...){
    m_cardHandle = NULL;
  }
  LOG4CPLUS_DEBUG(logger,"CTongshiDVBSource::DeactivateCard - finish");
  return S_OK;
}
开发者ID:MisterD81,项目名称:SourceFilters,代码行数:16,代码来源:tongshidvbsource.cpp

示例13: fprintf

void Logging::Debug(const string& msg) {
    if("" == logger_name_) {
        fprintf(stderr, "has not set logger\n");
        return;
    }
    LOG4CPLUS_DEBUG(logger_, msg);
}
开发者ID:binggozju,项目名称:webhttpd,代码行数:7,代码来源:logging.cpp

示例14: atoi

int CCrawl::response_status_function()
{
	m_responseheaders.getResponseparameterFromSrc(m_CRequestUrl.getCRequestUrl(), m_httpRequest->m_responseHeader);

	int status_code = 0;
	status_code = atoi(m_responseheaders.getStatusCode().c_str());
	LOG4CPLUS_DEBUG(ClogCPP::m_logger, status_code);
	return status_code;
	switch(status_code)
	{
	case 200:
		response_return_code_200();
		break;
	case 204:
		response_return_code_204();
		break;
	case 206:
		response_return_code_206();
		break;
	case 301:
		response_return_code_301();
		break;
	case 302:
		response_return_code_302();
		break;
	case 303:
		response_return_code_303();
		break;
	case 304:
		response_return_code_304();
		break;
	case 307:
		response_return_code_307();
		break;
	case 400:
		response_return_code_400();
		break;
	case 401:
		response_return_code_401();
		break;
	case 403:
		response_return_code_403();
		break;
	case 404:
		response_return_code_404();
		break;
	case 405:
		response_return_code_200();
		break;
	case 500:
		response_return_code_500();
		break;
	case 503:
		response_return_code_503();
		break;
	default:
		break;
	}
	return status_code;
}
开发者ID:maxingjiang,项目名称:crawl,代码行数:60,代码来源:CCrawl.cpp

示例15: sin

/**
 * Calculate pose of the camera. Since no translation are made
 * Only the rotation is calculated.
 *
 * [R|T]
 */
CvMat* MultipleViewGeomOld::calculateRotationMatrix(float angle) {

    // | R T |
    // | 0 1 |
    // 1 	 0 	    0 	0
    // 0 cos() -sin()   0
    // 0 sin()  cos()   0
    // 0     0      0   1

    float sinTeta = sin(angle);
    float cosTeta = cos(angle);

    float a[] = { 1, 0, 0, 0, 0, cosTeta, -sinTeta, 0, 0, sinTeta, cosTeta, 0,
                  0, 0, 0, 1
                };

    //CvMat rtMat = cvMat(4, 4, CV_32FC1, a);
    //rtMat = *cvCloneMat(&rtMat);

    CvMat* rtMat = cvCreateMat(4, 4, CV_32F);
    cvInitMatHeader(rtMat, 4, 4, CV_32F, a);
    rtMat = cvCloneMat(rtMat);

    LOG4CPLUS_DEBUG(myLogger,"Rotation R|T matrix for angle: " << angle << endl << printCvMat(rtMat));

    return rtMat;

}
开发者ID:ricleal,项目名称:3dac,代码行数:34,代码来源:MultipleViewGeomOld.cpp


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