diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
commit | 7a52d43a162b23d9e85e7b955e9b2c8e9caf550e (patch) | |
tree | 66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/examples/APG/Logging/Howto_Syslog.cpp | |
parent | 0e49389337be86641451a5c36c24bf742fe97523 (diff) | |
download | ATCD-7a52d43a162b23d9e85e7b955e9b2c8e9caf550e.tar.gz |
Repo restructuring
Diffstat (limited to 'ACE/examples/APG/Logging/Howto_Syslog.cpp')
-rw-r--r-- | ACE/examples/APG/Logging/Howto_Syslog.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ACE/examples/APG/Logging/Howto_Syslog.cpp b/ACE/examples/APG/Logging/Howto_Syslog.cpp new file mode 100644 index 00000000000..283099a3da1 --- /dev/null +++ b/ACE/examples/APG/Logging/Howto_Syslog.cpp @@ -0,0 +1,28 @@ +// $Id$ + +#include "ace/Log_Msg.h" + +void foo (void); + +// Listing 1 code/ch03 +int ACE_TMAIN (int, ACE_TCHAR *argv[]) +{ + ACE_LOG_MSG->open + (argv[0], ACE_Log_Msg::SYSLOG, ACE_TEXT ("syslogTest")); + // Listing 1 + + ACE_TRACE ("main"); + + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IHi Mom\n"))); + foo (); + 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"))); +} |