diff options
author | dai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-06-07 03:31:22 +0000 |
---|---|---|
committer | dai_y <dai_y@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-06-07 03:31:22 +0000 |
commit | dfe15cd01b5a744743d3ea491c51401d40bbe8e5 (patch) | |
tree | f13f622f59ecd14ff70d97c024784758e1b8e8b0 /ACE/ace/Log_Msg.cpp | |
parent | d049f1131cf54dd9ee534a475115d162f8d7c1b4 (diff) | |
download | ATCD-dfe15cd01b5a744743d3ea491c51401d40bbe8e5.tar.gz |
Sat Jun 7 03:28:01 UTC 2008 Yan Dai <dai_y@ociweb.com>
Diffstat (limited to 'ACE/ace/Log_Msg.cpp')
-rw-r--r-- | ACE/ace/Log_Msg.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 692b09af050..0215fc0f5fe 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -38,6 +38,7 @@ #include "ace/Log_Msg_UNIX_Syslog.h" #include "ace/Log_Record.h" #include "ace/Recursive_Thread_Mutex.h" +#include "ace/Stack_Trace.h" #if !defined (__ACE_INLINE__) #include "ace/Log_Msg.inl" @@ -1990,6 +1991,23 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, ACE_UPDATE_COUNT (bspace, this_len); break; + case '?': + // Stack trace up to this point + { + // skip the frame that we're currently in + ACE_Stack_Trace t(2); + ACE_OS::strcpy (fp, ACE_LIB_TEXT ("s")); + if (can_check) + this_len = ACE_OS::snprintf + (bp, bspace, format, t.c_str ()); + else + this_len = ACE_OS::sprintf + (bp, format, t.c_str ()); + ACE_UPDATE_COUNT (bspace, this_len); + break; + } + + default: // So, it's not a legit format specifier after all... // Copy from the original % to where we are now, then |