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


C++ EventLogger::createConsoleHandler方法代码示例

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


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

示例1: ConfigRetriever

Ndb_cluster_connection_impl::Ndb_cluster_connection_impl(const char *
							 connect_string)
  : Ndb_cluster_connection(*this),
    m_optimized_node_selection(1),
    m_name(0)
{
  DBUG_ENTER("Ndb_cluster_connection");
  DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%lx", (long) this));

  g_eventLogger.createConsoleHandler();
  g_eventLogger.setCategory("NdbApi");
  g_eventLogger.enable(Logger::LL_ON, Logger::LL_ERROR);

  m_connect_thread= 0;
  m_connect_callback= 0;

  if (ndb_global_event_buffer_mutex == NULL)
    ndb_global_event_buffer_mutex= NdbMutex_Create();

#ifdef VM_TRACE
  if (ndb_print_state_mutex == NULL)
    ndb_print_state_mutex= NdbMutex_Create();
#endif
  m_config_retriever=
    new ConfigRetriever(connect_string, NDB_VERSION, NODE_TYPE_API);
  if (m_config_retriever->hasError())
  {
    printf("Could not connect initialize handle to management server: %s",
	   m_config_retriever->getErrorString());
    delete m_config_retriever;
    m_config_retriever= 0;
  }
  if (m_name)
  {
    NdbMgmHandle h= m_config_retriever->get_mgmHandle();
    ndb_mgm_set_name(h, m_name);
  }
  m_transporter_facade=
    TransporterFacade::theFacadeInstance= 
    new TransporterFacade();
  
  DBUG_VOID_RETURN;
}
开发者ID:isleon,项目名称:Jaxer,代码行数:43,代码来源:ndb_cluster_connection.cpp

示例2: ConfigRetriever

Ndb_cluster_connection_impl::Ndb_cluster_connection_impl(const char *
							 connect_string)
  : Ndb_cluster_connection(*this),
    m_optimized_node_selection(1),
    m_name(0),
    m_run_connect_thread(0),
    m_event_add_drop_mutex(0),
    m_latest_trans_gci(0)
{
  DBUG_ENTER("Ndb_cluster_connection");
  DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%lx", (long) this));

  if (!m_event_add_drop_mutex)
    m_event_add_drop_mutex= NdbMutex_Create();

  g_eventLogger.createConsoleHandler();
  g_eventLogger.setCategory("NdbApi");
  g_eventLogger.enable(Logger::LL_ON, Logger::LL_ERROR);

  m_connect_thread= 0;
  m_connect_callback= 0;

#ifdef VM_TRACE
  if (ndb_print_state_mutex == NULL)
    ndb_print_state_mutex= NdbMutex_Create();
#endif
  m_config_retriever=
    new ConfigRetriever(connect_string, NDB_VERSION, NODE_TYPE_API);
  if (m_config_retriever->hasError())
  {
    printf("Could not initialize handle to management server: %s\n",
	   m_config_retriever->getErrorString());
    delete m_config_retriever;
    m_config_retriever= 0;
  }
  if (m_name)
  {
    NdbMgmHandle h= m_config_retriever->get_mgmHandle();
    ndb_mgm_set_name(h, m_name);
  }
  m_transporter_facade= new TransporterFacade();
  
  NdbMutex_Lock(g_ndb_connection_mutex);
  if(g_ndb_connection_count++ == 0){
    NdbDictionary::Column::FRAGMENT= 
      NdbColumnImpl::create_pseudo("NDB$FRAGMENT");
    NdbDictionary::Column::FRAGMENT_FIXED_MEMORY= 
      NdbColumnImpl::create_pseudo("NDB$FRAGMENT_FIXED_MEMORY");
    NdbDictionary::Column::FRAGMENT_VARSIZED_MEMORY= 
      NdbColumnImpl::create_pseudo("NDB$FRAGMENT_VARSIZED_MEMORY");
    NdbDictionary::Column::ROW_COUNT= 
      NdbColumnImpl::create_pseudo("NDB$ROW_COUNT");
    NdbDictionary::Column::COMMIT_COUNT= 
      NdbColumnImpl::create_pseudo("NDB$COMMIT_COUNT");
    NdbDictionary::Column::ROW_SIZE=
      NdbColumnImpl::create_pseudo("NDB$ROW_SIZE");
    NdbDictionary::Column::RANGE_NO= 
      NdbColumnImpl::create_pseudo("NDB$RANGE_NO");
    NdbDictionary::Column::DISK_REF= 
      NdbColumnImpl::create_pseudo("NDB$DISK_REF");
    NdbDictionary::Column::RECORDS_IN_RANGE= 
      NdbColumnImpl::create_pseudo("NDB$RECORDS_IN_RANGE");
    NdbDictionary::Column::ROWID= 
      NdbColumnImpl::create_pseudo("NDB$ROWID");
    NdbDictionary::Column::ROW_GCI= 
      NdbColumnImpl::create_pseudo("NDB$ROW_GCI");
    NdbDictionary::Column::ANY_VALUE= 
      NdbColumnImpl::create_pseudo("NDB$ANY_VALUE");
    NdbDictionary::Column::COPY_ROWID= 
      NdbColumnImpl::create_pseudo("NDB$COPY_ROWID");
  }
  NdbMutex_Unlock(g_ndb_connection_mutex);

  DBUG_VOID_RETURN;
}
开发者ID:Abner-Sun,项目名称:mysql5.1-vx-pre1,代码行数:75,代码来源:ndb_cluster_connection.cpp


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