Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / APG / Logging / Use_LogManager.cpp
blobc3fcf27292f4718f9714c75aa1a5aa7f33920127
1 #include "LogManager.h"
3 // Listing 1 code/ch03
4 void foo ();
6 int ACE_TMAIN (int, ACE_TCHAR *[])
8 LOG_MANAGER->redirectToStderr ();
9 ACE_TRACE ("main");
10 LOG_MANAGER->redirectToSyslog ();
11 ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHi Mom\n")));
12 foo ();
13 LOG_MANAGER->redirectToDaemon ();
14 ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IGoodnight\n")));
16 return 0;
18 void foo ()
20 ACE_TRACE ("foo");
21 LOG_MANAGER->redirectToFile ("output.test");
22 ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHowdy Pardner\n")));
24 // Listing 1
26 // Listing 2 code/ch03
27 ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, LogManager, ACE_Null_Mutex);
29 // Listing 2