use_stderr.cpp

来自「ACE自适配通信环境(ADAPTIVE Communication Enviro」· C++ 代码 · 共 39 行

CPP
39
字号
// Use_Stderr.cpp,v 1.2 2004/10/06 16:27:14 shuston Exp#include "ace/Log_Msg.h"void foo (void);// Listing 1 code/ch03int ACE_TMAIN (int, ACE_TCHAR *argv[]){  // open() requires the name of the application  // (e.g. -- argv[0]) because the underlying  // implementation may use it in the log output.  ACE_LOG_MSG->open (argv[0], ACE_Log_Msg::STDERR);  // Listing 1  /* Alternatively, you can use the set_flags() method to do the same     thing after the singleton has been created:  */  ACE_TRACE ("main");  // Listing 2 code/ch03  ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n")));  ACE_LOG_MSG->set_flags (ACE_Log_Msg::STDERR);  foo ();  // Listing 2  ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IGoodnight\n")));  return 0;}void foo (void){  ACE_TRACE ("foo");  ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHowdy Pardner\n")));}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?