summaryrefslogtreecommitdiff
path: root/ace/Log_Msg.h
diff options
context:
space:
mode:
authorharrison <harrison@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-02-18 04:13:01 +0000
committerharrison <harrison@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-02-18 04:13:01 +0000
commit44346023fb73dcba2a8b16035e5e1d715498154b (patch)
tree304c22fcbe4703ff7eda47f2437a687a0bb217aa /ace/Log_Msg.h
parent044465386cb8dd9075d80fb98e221069556f6ff0 (diff)
downloadATCD-44346023fb73dcba2a8b16035e5e1d715498154b.tar.gz
jjj
Diffstat (limited to 'ace/Log_Msg.h')
-rw-r--r--ace/Log_Msg.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h
index 09bbc6c328e..bbf547e66af 100644
--- a/ace/Log_Msg.h
+++ b/ace/Log_Msg.h
@@ -26,9 +26,11 @@
#define ACE_ASSERT(x)
#else
#define ACE_ASSERT(X) \
- do { if(!(X)) { int __ace_error = errno; ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
+ do { if(!(X)) { \
+ int __ace_error = ACE_OS::last_error (); \
+ ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
ace___->set (__FILE__, __LINE__, -1, __ace_error, ace___->restart (), ace___->msg_ostream ()); \
- ace___->log (LM_ERROR, "(%P|%t) ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n", #X, -1); \
+ ace___->log (LM_ERROR, "ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n", #X, -1); \
} } while (0)
#endif /* ACE_NDEBUG */
@@ -42,32 +44,37 @@
#define ACE_ERROR_INIT(VALUE, FLAGS)
#else
#define ACE_HEX_DUMP(X) \
- do { int __ace_error = errno; \
+ do { \
+ int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
ace___->set (__FILE__, __LINE__, 0, __ace_error, ace___->restart (), \
ace___->msg_ostream ()); \
ace___->log_hexdump X; \
} while (0)
#define ACE_RETURN(Y) \
- do { int __ace_error = errno; \
+ do { \
+ int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg::instance ()->set (__FILE__, __LINE__, Y, __ace_error); \
return Y; \
} while (0)
#define ACE_ERROR_RETURN(X, Y) \
- do { int __ace_error = errno; \
+ do { \
+ int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
ace___->set (__FILE__, __LINE__, Y, __ace_error, ace___->restart (), ace___->msg_ostream ()); \
ace___->log X; \
return Y; \
} while (0)
#define ACE_ERROR(X) \
- do { int __ace_error = errno; \
+ do { \
+ int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
ace___->set (__FILE__, __LINE__, -1, __ace_error, ace___->restart (), ace___->msg_ostream ()); \
ace___->log X; \
} while (0)
#define ACE_DEBUG(X) \
- do { int __ace_error = errno; \
+ do { \
+ int __ace_error = ACE_OS::last_error (); \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
ace___->set (__FILE__, __LINE__, 0, __ace_error, ace___->restart (), ace___->msg_ostream ()); \
ace___->log X; \
@@ -122,8 +129,6 @@ public:
ACE_Log_Msg (void);
// Initialize logger.
- ~ACE_Log_Msg (void);
-
int open (const char *prog_name,
u_long options_flags = ACE_Log_Msg::STDERR,
LPCTSTR logger_key = 0);