您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wlog函数代码示例

51自学网 2021-06-03 10:00:54
  C++
这篇教程C++ wlog函数代码示例写得很实用,希望能帮到您。

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

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

示例1: option

  void tcp_socket::enable_keep_alives(const fc::microseconds& interval)  {    if (interval.count())    {      boost::asio::socket_base::keep_alive option(true);      my->_sock.set_option(option);#if defined _WIN32 || defined WIN32 || defined OS_WIN64 || defined _WIN64 || defined WIN64 || defined WINNT      struct tcp_keepalive keepalive_settings;      keepalive_settings.onoff = 1;      keepalive_settings.keepalivetime = (ULONG)(interval.count() / fc::milliseconds(1).count());      keepalive_settings.keepaliveinterval = (ULONG)(interval.count() / fc::milliseconds(1).count());      DWORD dwBytesRet = 0;      if (WSAIoctl(my->_sock.native(), SIO_KEEPALIVE_VALS, &keepalive_settings, sizeof(keepalive_settings),                   NULL, 0, &dwBytesRet, NULL, NULL) == SOCKET_ERROR)        wlog("Error setting TCP keepalive values");#elif !defined(__clang__) || (__clang_major__ >= 6)      // This should work for modern Linuxes and for OSX >= Mountain Lion      int timeout_sec = interval.count() / fc::seconds(1).count();      if (setsockopt(my->_sock.native(), IPPROTO_TCP,       #if defined( __APPLE__ )                     TCP_KEEPALIVE,       #else                     TCP_KEEPIDLE,        #endif                     (char*)&timeout_sec, sizeof(timeout_sec)) < 0)        wlog("Error setting TCP keepalive idle time");# if !defined(__APPLE__) || defined(TCP_KEEPINTVL) // TCP_KEEPINTVL not defined before 10.9      if (setsockopt(my->_sock.native(), IPPROTO_TCP, TCP_KEEPINTVL,                      (char*)&timeout_sec, sizeof(timeout_sec)) < 0)        wlog("Error setting TCP keepalive interval");# endif // !__APPLE__ || TCP_KEEPINTVL#endif // !WIN32    }    else    {      boost::asio::socket_base::keep_alive option(false);      my->_sock.set_option(option);    }  }
开发者ID:BestSilent,项目名称:eos,代码行数:40,


示例2: get_next_bid

                  bool get_next_bid()                  { try {                     if( _current_bid && _current_bid->get_quantity().amount > 0 )                        return _current_bid.valid();                     _current_bid.reset();                     if( _bid_itr.valid() )                     {                        auto bid = market_order( bid_order, _bid_itr.key(), _bid_itr.value() );                        if( bid.get_price().quote_asset_id == _quote_id &&                            bid.get_price().base_asset_id == _base_id )                        {                            _current_bid = bid;                        }                     }                     if( _short_itr.valid() )                     {                        auto bid = market_order( short_order, _short_itr.key(), _short_itr.value() );                        wlog( "SHORT ITER VALID: ${o}", ("o",bid) );                        if( bid.get_price().quote_asset_id == _quote_id &&                            bid.get_price().base_asset_id == _base_id )                        {                            if( !_current_bid || _current_bid->get_price() < bid.get_price() )                            {                               --_short_itr;                               _current_bid = bid;                               ilog( "returning ${v}", ("v",_current_bid.valid() ) );                               return _current_bid.valid();                            }                        }                     }                     else                     {                        wlog( "           No Shorts         ****   " );                     }                     if( _bid_itr.valid() ) --_bid_itr;                     return _current_bid.valid();                  } FC_CAPTURE_AND_RETHROW() }
开发者ID:andrewisplinghoff,项目名称:bitsharesx,代码行数:39,


示例3: mangle_new

struct MangleMask* mangle_new(){    struct MangleMask* self=NULL;    self = calloc(1, sizeof(struct MangleMask));    if (self == NULL) {        wlog("Failed to allocate MangleMask/n");        return NULL;    }    mangle_clear(self);    return self;}
开发者ID:erykoff,项目名称:pymangle,代码行数:13,


示例4: catch

 database_api::~database_api() {    try {       if(_broadcast_changes_complete.valid())       {          _broadcast_changes_complete.cancel();          _broadcast_changes_complete.wait();       }    } catch (const fc::exception& e)    {       wlog("${e}", ("e",e.to_detail_string()));    } }
开发者ID:NaturalCoder,项目名称:graphene,代码行数:13,


示例5: ilog

 server::~server() {    ilog( "waiting for block generation loop to exit" );    try {       my->_block_gen_loop_complete.cancel();       my->_block_gen_loop_complete.wait();    }     catch ( const fc::canceled_exception& e ){}    catch ( const fc::exception& e )    {       wlog( "${e}", ("e",e.to_detail_string()) );    } }
开发者ID:HackFisher,项目名称:bitshares_snapshot,代码行数:13,


示例6: load_and_configure_chain_database

bts::blockchain::chain_database_ptr load_and_configure_chain_database(const fc::path& datadir,                                                                      const boost::program_options::variables_map& option_variables){  auto dns_chain = std::make_shared<bts::dns::dns_db>();  dns_chain->set_transaction_validator(std::make_shared<bts::dns::p2p::p2p_transaction_validator>(dns_chain.get()));  bts::blockchain::chain_database_ptr chain = dns_chain;  chain->open( datadir / "chain", true );  if (option_variables.count("trustee-address"))    chain->set_trustee(bts::blockchain::address(option_variables["trustee-address"].as<std::string>()));  if (option_variables.count("genesis-json"))  {    if (chain->head_block_num() == trx_num::invalid_block_num)    {      fc::path genesis_json_file(option_variables["genesis-json"].as<std::string>());      bts::blockchain::trx_block genesis_block;      try      {        genesis_block = bts::net::create_test_genesis_block(genesis_json_file);      }      catch (fc::exception& e)      {        wlog("Error creating genesis block from file ${filename}: ${e}", ("filename", genesis_json_file)("e", e.to_string()));        return chain;      }      try      {        chain->push_block(genesis_block);      }      catch ( const fc::exception& e )      {        wlog( "error pushing genesis block to blockchain database: ${e}", ("e", e.to_detail_string() ) );      }    }    else      wlog("Ignoring genesis-json command-line argument because our blockchain already has a genesis block");  }  return chain;}
开发者ID:adbongo,项目名称:bitshares_toolkit,代码行数:39,


示例7: handle_message

        /* ===================================================== */           void handle_message( const connection_ptr& con, const message& m )        {           try {           chan_data& cdat = get_channel_data(con);            ilog( "${msg_type}", ("msg_type", (bitname::message_type)m.msg_type ) );                      switch( (bitname::message_type)m.msg_type )           {               case name_inv_msg:                 handle_name_inv( con, cdat, m.as<name_inv_message>() );                 break;               case block_inv_msg:                 handle_block_inv( con, cdat, m.as<block_inv_message>() );                 break;               case get_name_inv_msg:                 handle_get_name_inv( con, cdat, m.as<get_name_inv_message>() );                 break;               case get_headers_msg:                 handle_get_headers( con, cdat, m.as<get_headers_message>() );                 break;               case get_block_msg:                 handle_get_block( con, cdat, m.as<get_block_message>() );                 break;               case get_block_index_msg:                 handle_get_block_index( con, cdat, m.as<get_block_index_message>() );                 break;               case get_name_header_msg:                 handle_get_name( con, cdat, m.as<get_name_header_message>() );                 break;               case name_header_msg:                 handle_name( con, cdat, m.as<name_header_message>() );                 break;               case block_index_msg:                 handle_block_index( con, cdat, m.as<block_index_message>() );                 break;               case block_msg:                 handle_block( con, cdat, m.as<block_message>() );                 break;               case headers_msg:                 handle_headers( con, cdat, m.as<headers_message>() );                 break;               default:                 FC_THROW_EXCEPTION( exception, "unknown bitname message type ${msg_type}", ("msg_type", m.msg_type ) );           }          }           catch ( fc::exception& e )          {            wlog( "${e}  ${from}", ("e",e.to_detail_string())("from",con->remote_endpoint()) );          }        }  // handle_message
开发者ID:1manStartup,项目名称:BitShares,代码行数:52,


示例8: read_loop

 void read_loop() {    while( !m_done ) {      tornet::rpc::message msg;      tornet::rpc::raw::unpack(udt_chan,msg);      switch( msg.type ) {        case message::notice: self.handle_notice(msg); break;        case message::call:   self.handle_call(msg);   break;        case message::result: self.handle_result(msg); break;        case message::error:  self.handle_error(msg);  break;        default:           wlog( "invalid message type %1%", int( msg.type ) );      };    } }
开发者ID:Zhang-Yi,项目名称:tornet,代码行数:14,


示例9: files_attr

static void files_attr(xmpp_stanza_t *stanza) {  int rc; /* Return code */  rc = pthread_mutex_lock(&mutex);  wsyserr(rc != 0, "pthread_mutex_lock");  char *error_attr = xmpp_stanza_get_attribute(stanza, "error"); /* error attribute */  wfatal(error_attr == NULL, "no error attribute in files stanza");  if (strcmp(error_attr, "0") != 0) {    wlog("Error in attributes: %s", error_attr);    attributes.is_valid = -1;  } else {    char *type_attr = xmpp_stanza_get_attribute(stanza, "type"); /* type attribute */    wfatal(type_attr == NULL, "no type attribute in files stanza");    if (strcmp(type_attr, "directory") == 0) {      attributes.is_valid = 1;      attributes.type = DIR;    } else if (strcmp(type_attr, "file") == 0) {      attributes.is_valid = 1;      attributes.type = REG;    } else {      werr("Unknown type: %s", type_attr);      attributes.is_valid = -1;    }    char *size_attr = xmpp_stanza_get_attribute(stanza, "size"); /* size */    if (size_attr == NULL) {      werr("xmpp_stanza_get_attribute attribute = size (%s)", xmpp_stanza_get_attribute(stanza, "path"));      attributes.size = 0;    } else {      char *endptr; /* strtol endptr */      long int size = strtol(size_attr, &endptr, 10);      if (*endptr != '/0') {        werr("strtol error: str = %s, val = %ld", size_attr, size);        attributes.size = 0;      }      attributes.size = size;    }  }  signal_attr = true;  rc = pthread_cond_signal(&cond);  wsyserr(rc != 0, "pthread_cond_signal");  rc = pthread_mutex_unlock(&mutex);  wsyserr(rc != 0, "pthread_mutex_unlock");}
开发者ID:RedPitaya,项目名称:wyliodrin-server,代码行数:50,


示例10: ilog

  void profile::open( const fc::path& profile_dir, const std::string& password )  { try {      ilog("opening profile: ${profile_dir}",("profile_dir",profile_dir));      my->_profile_name = profile_dir.filename().generic_wstring();      fc::create_directories( profile_dir );      fc::create_directories( profile_dir / "addressbook" );      fc::create_directories( profile_dir / "idents" );      fc::create_directories( profile_dir / "mail" );      fc::create_directories( profile_dir / "mail" / "inbox" );      fc::create_directories( profile_dir / "mail" / "draft" );      fc::create_directories( profile_dir / "mail" / "pending" );      fc::create_directories( profile_dir / "mail" / "sent" );      fc::create_directories( profile_dir / "chat" );      fc::create_directories( profile_dir / "request" );      fc::create_directories( profile_dir / "authorization" );      ilog("loading master key file:" KEYHOTEE_MASTER_KEY_FILE);      auto profile_cfg_key         = fc::sha512::hash( password.c_str(), password.size() );      std::vector<char> stretched_seed_data;      try {        stretched_seed_data     = fc::aes_load( profile_dir / KEYHOTEE_MASTER_KEY_FILE, profile_cfg_key );      }      catch (fc::exception& /* e */)      { //try to open legacy name for key file        wlog("Could not open " KEYHOTEE_MASTER_KEY_FILE ", trying to open legacy key file (.strecthed_seed).");        stretched_seed_data     = fc::aes_load( profile_dir / ".stretched_seed", profile_cfg_key );      }      ilog("opening profile databases");      my->_keychain.set_seed( fc::raw::unpack<fc::sha512>(stretched_seed_data) );      my->_addressbook->open( profile_dir / "addressbook", profile_cfg_key );      my->_idents.open( profile_dir / "idents" );      my->_inbox_db->open( profile_dir / "mail" / "inbox", profile_cfg_key );      my->_draft_db->open( profile_dir / "mail" / "draft", profile_cfg_key );      my->_pending_db->open( profile_dir / "mail" / "pending", profile_cfg_key );      my->_sent_db->open( profile_dir / "mail" / "sent", profile_cfg_key );      my->_chat_db->open( profile_dir / "chat", profile_cfg_key );      my->_request_db->open( profile_dir / "request", profile_cfg_key );      my->_auth_db->open( profile_dir / "authorization", profile_cfg_key );      my->_last_sync_time.open( profile_dir / "mail" / "last_recv", true );      if( *my->_last_sync_time == fc::time_point())      {          *my->_last_sync_time = fc::time_point::now() - fc::days(5);          ilog("set last_sync_time to ${t}",("t",*my->_last_sync_time));      }      else          ilog("loaded last_sync_time = ${t}",("t",*my->_last_sync_time));    ilog("finished opening profile");  } FC_RETHROW_EXCEPTIONS( warn, "", ("profile_dir",profile_dir) ) }
开发者ID:drltc,项目名称:BitShares,代码行数:50,


示例11: catch

upnp_service::~upnp_service(){  try {      my->done = true;      my->upnp_thread.quit();      my->map_port_complete.wait();  }   catch ( const fc::canceled_exception& e )  {} // expected  catch ( const fc::exception& e )  {      wlog( "unexpected exception/n ${e}", ("e", e.to_detail_string() ) );  }}
开发者ID:bytemaster,项目名称:bitshares,代码行数:14,


示例12: ilog

 void connection::exec_sync_loop() {     ilog( "exec sync loop" );     my->exec_sync_loop_complete = fc::async( [=]()      {       try {        // ilog( "in exec sync loop" );         while( !my->exec_sync_loop_complete.canceled() )         {            //ilog( "sync time ${t}", ("t",my->_sync_time) );            auto itr = my->_mail_db->lower_bound( my->_sync_time );            if( !itr.valid() )            {             ilog( "no valid message found" );            }            while( itr.valid() && !my->exec_sync_loop_complete.canceled() )            {               if( itr.key() > my->_sync_time )               {                  send( message( itr.value() ) );                  my->_sync_time = itr.key();               }               ++itr;            }            fc::usleep( fc::seconds(15) );         }       }        catch ( const fc::exception& e )       {          wlog( "${e}", ("e", e.to_detail_string() ) );       }       catch ( ... )       {          wlog("other exeception" );       }     }); }
开发者ID:ripplexiaoshan,项目名称:BitShares,代码行数:37,


示例13: catch

upnp_service::~upnp_service(){  try   {      my->done = true;      if( my->map_port_complete.valid() )         my->map_port_complete.cancel_and_wait();  }   catch ( const fc::canceled_exception& )  {} // expected  catch ( const fc::exception& e )  {      wlog( "unexpected exception/n ${e}", ("e", e.to_detail_string() ) );  }}
开发者ID:AlexChien,项目名称:bitshares,代码行数:15,


示例14: network_connect

/********************************************************************* return RET_NOK on error *********************************************************************/ret_code_t network_connect(context_t * context, const char * hostname){	IPaddress ip;	TCPsocket socket;	wlog(LOGUSER, "Trying to connect to %s:%d", hostname, PORT);	if (SDLNet_Init() < 0)	{		werr(LOGUSER, "Can't init SDLNet: %s/n", SDLNet_GetError());		return RET_NOK;	}	if (SDLNet_ResolveHost(&ip, hostname, PORT) < 0)	{		werr(LOGUSER, "Can't resolve %s:%d : %s/n", hostname, PORT,				SDLNet_GetError());		return RET_NOK;	}	if (!(socket = SDLNet_TCP_Open(&ip)))	{		werr(LOGUSER, "Can't connect to %s:%d : %s/n", hostname, PORT,				SDLNet_GetError());		return RET_NOK;	}	wlog(LOGUSER, "Connected to %s:%d", hostname, PORT);	context_set_hostname(context, hostname);	context_set_socket(context, socket);	SDL_CreateThread(async_recv, "async_recv", (void*) context);	return RET_OK;}
开发者ID:Bob-Z,项目名称:World-of-Gnome,代码行数:39,


示例15: clean_name

std::string clean_name( const std::string& name ){   std::string result;   const static std::string prefix = "graphene::chain::";   const static std::string suffix = "_operation";   // graphene::chain::.*_operation   if(    (name.size() >= prefix.size() + suffix.size())       && (name.substr( 0, prefix.size() ) == prefix)       && (name.substr( name.size()-suffix.size(), suffix.size() ) == suffix )     )        return name.substr( prefix.size(), name.size() - prefix.size() - suffix.size() );   wlog( "don't know how to clean name: ${name}", ("name", name) );   return name;}
开发者ID:8001800,项目名称:graphene,代码行数:15,


示例16: process_connection

      void process_connection( connection con )      {          try           {             con.send( message(version_message(1)) );             while( true )             {                 auto msg = con.recv();                 switch( msg.msg_type.value )                 {                    case version_msg:                       FC_ASSERT( msg.as<version_message>().version == 1 );                       break;                    case get_block_msg:                       break;                    case get_transaction_msg:                       break;                    case block_msg:                       wlog( "No one sends me blocks!" );                       break;                    case trx_block_msg:                       wlog( "No one sends me blocks!" );                       break;                    case transaction_msg:                       break;                    default:                       FC_ASSERT( !"Unknown Message Type", "Unknown message type ${msg}", ("msg",msg) );                 }             }          }           catch ( const fc::exception& e )          {               connections.erase( con.sock->remote_endpoint() );          }      }
开发者ID:1manStartup,项目名称:BitShares,代码行数:36,


示例17: close_connection

    void peer_connection::destroy()    {      try       {        close_connection();      }       catch ( ... )       {      }      try       {         _send_queued_messages_done.cancel_and_wait();       }       catch( const fc::exception& e )      {        wlog("Unexpected exception from peer_connection's send_queued_messages_task : ${e}", ("e", e));      }      catch( ... )      {        wlog("Unexpected exception from peer_connection's send_queued_messages_task");      }            try       {         accept_or_connect_task_done.cancel_and_wait();       }       catch( const fc::exception& e )      {        wlog("Unexpected exception from peer_connection's accept_or_connect_task : ${e}", ("e", e));      }      catch( ... )      {        wlog("Unexpected exception from peer_connection's accept_or_connect_task");      }    }
开发者ID:Curve25519,项目名称:bitsharesx,代码行数:36,


示例18: mangle_read

int mangle_read(struct MangleMask* self, const char* filename){    int status=1;    mangle_clear(self);    self->filename=strdup(filename);    self->fptr = fopen(filename,"r");    if (self->fptr == NULL) {        wlog("Failed to open file for reading: %s/n",filename);        status=0;        goto _mangle_read_bail;    }    if (!mangle_read_header(self)) {        status=0;        goto _mangle_read_bail;    }    if (self->verbose)        wlog("reading %ld polygons/n", self->npoly);    self->poly_vec = read_polygons(self->fptr, self->npoly);    if (!self->poly_vec) {        status=0;        goto _mangle_read_bail;    }    mangle_calc_area_and_maxpix(self);    if (!set_pixel_map(self)) {        status=0;        goto _mangle_read_bail;    }_mangle_read_bail:    return status;}
开发者ID:erykoff,项目名称:pymangle,代码行数:36,


示例19: wlog

struct gmix *get_gmix(size_t ngauss){    if (ngauss != 2) {        wlog("only ngauss==2 for now/n");        exit(EXIT_FAILURE);    }    struct gmix *gmix = gmix_new(ngauss);    struct gauss *gptr = gmix->data;    gauss_set(&gptr[0],            0.6, 15., 15., 2.0, 0.0, 1.7);    gauss_set(&gptr[1],            0.4, 10., 8., 1.5, .3, 4.);    return gmix;}
开发者ID:esheldon,项目名称:misc,代码行数:15,


示例20: lock

void mutex::lock() {    cmt::context* n  = 0;    cmt::context* cc = cmt::thread::current().current_context();    {        boost::unique_lock<cmt::spin_yield_lock> lock(m_blist_lock);        if( !m_blist ) {            m_blist = cc;            return;        }        // allow recusive locks        if ( get_tail( m_blist, n ) == cc ) {            return;        }        cc->next_blocked = m_blist;        m_blist = cc;        int cnt = 0;        auto i = m_blist;        while( i ) {            i = i->next_blocked;            ++cnt;        }        wlog( "wait queue len %1%", cnt );    }    try {        cmt::thread::current().yield(false);        BOOST_ASSERT( cc->next_blocked == 0 );    } catch ( ... ) {        wlog( "lock with throw %1% %2%",this, boost::current_exception_diagnostic_information() );        cleanup( *this, m_blist_lock, m_blist, cc);        throw;    }}
开发者ID:bytemaster,项目名称:mace,代码行数:36,


示例21: wlog

void TConnectionProcessor::received_text(const bts::bitchat::decrypted_message& msg){  try  {    auto aBook = Profile->get_addressbook();    fc::optional<bts::addressbook::wallet_contact> optContact;    if(msg.from_key)      optContact = aBook->get_contact_by_public_key(*msg.from_key);    if(optContact)    {      wlog("Received text from known contact!");      if(!_chat_allow_flag ||        (*optContact).auth_status == bts::addressbook::authorization_status::accepted ||        (*optContact).auth_status == bts::addressbook::authorization_status::accepted_chat)      {        Profile->get_chat_db()->store_message(msg, nullptr);        auto chatMsg = msg.as<bts::bitchat::private_text_message>();        Sink->OnReceivedChatMessage(*optContact, chatMsg, msg.sig_time);      }      else      {        wlog("Chat message from known contact rejected!");      }    }    else    {      elog("Received chat message from unknown contact/missing sender - ignoring");    }  }  catch(const fc::exception& e)  {    elog("${e}", ("e", e.to_detail_string()));  }}
开发者ID:InvictusInnovations,项目名称:keyhotee,代码行数:36,


示例22: iotest

/*	iotest - do various io syscalls */intiotest(){	char	*fname = "/usr/tmp/foobar";	int	fd;	/* file descriptor for raw IO */	int	fd2;	/* file descriptor for raw IO */	int	k;	/* temp value for loop */	char	buf[BUFSIZE];	unsigned long	size = 0;	/* Log the regular read */	wlog("start of iotest", NULL);	/* create an empty file */	fd = creat(fname, 0666);	/* dup the file descriptor */	fd2 = dup(fd);	close(fd2);	close(fd);	/* now open the empty file */	fd = open(fname, O_RDONLY);	/* loop, reading into the buffer */	size = 0;	for(;;) {		k = read(fd, buf, BUFSIZE);		if (k < 0) {			fprintf(stderr, "++ERROR reading %s, error %d/n",				fname, errno );		} else {			size = size + k;		}		if (k != BUFSIZE) {			/* close the file */			close(fd);			/* short eread = EOF */			break;		}	}	/* remove the file */	unlink(fname);	return 0;}
开发者ID:dhaley,项目名称:dcp,代码行数:49,


示例23: ilog

 client::~client() {    try {       if( my->_trustee_loop_complete.valid() )       {          my->_trustee_loop_complete.cancel();          ilog( "waiting for trustee loop to complete" );          my->_trustee_loop_complete.wait();       }     }    catch ( const fc::canceled_exception& ) {}    catch ( const fc::exception& e )    {       wlog( "${e}", ("e",e.to_detail_string() ) );    } }
开发者ID:jcalfee,项目名称:bitshares_toolkit,代码行数:16,


示例24: kill_job

static void kill_job(child_process *cp, int reason){	int ret;	struct rusage ru;	/* brutal but efficient */	ret = kill(cp->pid, SIGKILL);	if (ret < 0) {		if (errno == ESRCH) {			finish_job(cp, reason);			return;		}		wlog("kill(%d, SIGKILL) failed: %s/n", cp->pid, strerror(errno));	}	ret = wait4(cp->pid, &cp->ret, 0, &ru);	finish_job(cp, reason);#ifdef PLAY_NICE_IN_kill_job	int i, sig = SIGTERM;	pid = cp->pid;	for (i = 0; i < 2; i++) {		/* check one last time if the job is done */		ret = check_completion(cp, WNOHANG);		if (!ret || ret == -ECHILD) {			/* check_completion ran finish_job() */			return;		}		/* not done, so signal it. SIGTERM first and check again */		errno = 0;		ret = kill(pid, sig);		if (ret < 0) {			finish_job(cp, -errno);		}		sig = SIGKILL;		check_completion(cp, WNOHANG);		if (ret < 0) {			finish_job(cp, errno);		}		usleep(50000);	}#endif /* PLAY_NICE_IN_kill_job */}
开发者ID:formorer,项目名称:nagios,代码行数:46,


示例25: KeyboardProc

LRESULT WINAPI KeyboardProc(int code, WPARAM wParam, LPARAM lParam){	char info[100] = { 0 };	sprintf_s(info, 100, "code:%d,wp:%d,lp:%d/n", code, wParam, lParam);	if (HSHELL_WINDOWACTIVATED == code ){		HWND hwnd = (HWND)wParam;		wchar_t title[100];		GetWindowText(hwnd, title, 100);		wlog(title);	}	else{		log(info);	}	return CallNextHookEx(hHook, code, wParam, lParam);}
开发者ID:RocksonZeta,项目名称:dog,代码行数:17,


示例26: dup2

int dup2(int fd, int fd2){    // Call the close stub to avoid duplicating action logic.  This produces    // different behavior in the case where fd is not active.    close(fd2);    fd_map_dump();    wlog("dup2(%d, %d)", fd, fd2);    int ret = real_dup2(fd, fd2);    if (ret >= 0)        fd_map_dup2(fd, fd2);    fd_map_dump();    return ret;}
开发者ID:girving,项目名称:waitless,代码行数:17,


示例27: derivekeys

 void derivekeys( const std::string &passphrase ) {    if( seed_version == "4" )    {       try {          derivekeys_v4( passphrase );       }       catch ( const fc::exception& e )       {          wlog( "${e}", ("e",e.to_detail_string()) );       }    }    else    {       FC_THROW_EXCEPTION( exception, "failed to parse electrum wallet - unsupported seed_version" );    } }
开发者ID:BrownBear2,项目名称:BitShares,代码行数:17,


示例28: analyze_layout_in_grammar

static void analyze_layout_in_grammar ()	{ int nrpasses = 0;	  warning ("analyzing layout...");	  initial_analyze_layout_in_rules ();	  do	     { change = 0;	       nrpasses++;	       analyze_layout_for_rules ();	     }	  while (change);	  hint ("needed %d pass%s for layout analysis", nrpasses,		(nrpasses == 1)?"":"es");	  if (full_verbose)	     { wlog ("dumping layout analysis");	       report_on_layout ();	     };	};
开发者ID:tjordanchat,项目名称:eag,代码行数:17,


示例29: pack

inline void pack( Stream& s, const steem::protocol::legacy_steem_asset_symbol_type& sym ){   switch( sym.ser )   {      case STEEM_SYMBOL_LEGACY_SER_1:      case STEEM_SYMBOL_LEGACY_SER_2:      case STEEM_SYMBOL_LEGACY_SER_3:      case STEEM_SYMBOL_LEGACY_SER_4:      case STEEM_SYMBOL_LEGACY_SER_5:         wlog( "pack legacy serialization ${s}", ("s", sym.ser) );      case STEEM_SYMBOL_SER:         pack( s, sym.ser );         break;      default:         FC_ASSERT( false, "Cannot serialize legacy symbol ${s}", ("s", sym.ser) );   }}
开发者ID:mejustandrew,项目名称:steem,代码行数:17,



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


C++ wm831x_reg_read函数代码示例
C++ wlock函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。