diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-22 05:35:56 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-22 05:35:56 +0000 |
commit | 882270c09c9fad45663982851be9c850b74c3cb7 (patch) | |
tree | e351fe4d3f54aea5813897742aaa8ea3eda529bb | |
parent | 0a649755a72adb6b474ee1a32eb57dcb3a2c402c (diff) | |
download | ATCD-882270c09c9fad45663982851be9c850b74c3cb7.tar.gz |
*** empty log message ***
-rw-r--r-- | ChangeLog-98b | 6 | ||||
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | ace/Log_Record.cpp | 17 |
3 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b index 4a7f54556ca..89f56f4f70e 100644 --- a/ChangeLog-98b +++ b/ChangeLog-98b @@ -1,3 +1,9 @@ +Tue Sep 22 00:31:26 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * ace/Log_Record.cpp (print): Make sure that the process id and + timestamp are fixed width. Thanks to Valery Arkhangorodsky + <avalery@geocities.com> for this fix. + Mon Sep 21 22:54:44 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> * examples/Bounded_Packet_Relay: Removed a gratuitous @@ -640,6 +640,7 @@ Peter Liqun Na <liqunna@cs.sunysb.edu> Frank Adcock <frank@bushlife.com.au> Daniel A Nieten <dnieten@bellsouth.net> Xu Yifeng <xuyifeng@www.kali.com.cn> +Valery Arkhangorodsky <avalery@geocities.com> I would particularly like to thank Paul Stephenson, who worked with me at Ericsson and is now at ObjectSpace. Paul devised the recursive diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp index eaa6e9bdc55..d1a8b3d8539 100644 --- a/ace/Log_Record.cpp +++ b/ace/Log_Record.cpp @@ -205,15 +205,24 @@ ACE_Log_Record::print (const ASYS_TCHAR host_name[], 0 ? ASYS_TEXT ("<local_host>") : host_name; #endif /* ! defined (ACE_HAS_BROKEN_CONDITIONAL_STRING_CASTS) */ + // Make sure that the output of the timestamp and process id is + // "fixed width." + ASYS_TCHAR s_msec [10]; + ACE_OS::sprintf (s_msec, + "%03d", + this->time_stamp_.usec () / 1000); + ASYS_TCHAR s_pid [10]; + ACE_OS::sprintf (s_pid, + "%03d", + this->pid_); s << (ctp + 4) << '.' - // The following line isn't portable, so I've commented it out... - // << setw (3) << setfill ('0') << this->time_stamp_.usec () / 1000 << ' ' - << this->time_stamp_.usec () / 1000 << ' ' + << s_msec + << ' ' << (ctp + 20) << '@' << lhost_name << '@' - << this->pid_ + << s_pid << '@' << ACE_Log_Record::priority_name (ACE_Log_Priority (this->type_)) << '@'; |