(file) Return to Tracer.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Tracer.cpp between version 1.23 and 1.28

version 1.23, 2004/06/22 22:06:23 version 1.28, 2005/02/06 21:13:14
Line 1 
Line 1 
 //%2003////////////////////////////////////////////////////////////////////////  //%2005////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.  // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
 // IBM Corp.; EMC Corporation, The Open Group. // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 28 
Line 32 
 // Modified By: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com) // Modified By: Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
 //              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101 //              Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
   //              Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2498
   //              Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 154 
Line 160 
                 _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];                 _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];
             sprintf(             sprintf(
                message,                message,
   #if defined(PEGASUS_OS_VMS)
                  //
                  // pegasus_thread_self returns long-long-unsigned.
                  //
   //               "[%d:%llu:%s:%u]: ",
                  "[%x:%llx:%s:%u]: ",
                  System::getPID(),
                  pegasus_thread_self(),
   #else
                "[%d:%u:%s:%u]: ",                "[%d:%u:%s:%u]: ",
                System::getPID(),                System::getPID(),
                Uint32(pegasus_thread_self()),                Uint32(pegasus_thread_self()),
   #endif
                fileName,                fileName,
                lineNum);                lineNum);
  
Line 321 
Line 337 
         message = new char[ strlen(fileName) +         message = new char[ strlen(fileName) +
                             _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];                             _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];
  
   #if defined(PEGASUS_OS_VMS)
           //
           // pegasus_thread_self returns long-long-unsigned.
           //
           sprintf(
              message,
              "[%d:%llu:%s:%u]: ",
              System::getPID(),
              pegasus_thread_self(),
              fileName,
              lineNum);
   #else
         sprintf(         sprintf(
            message,            message,
            "[%d:%u:%s:%u]: ",            "[%d:%u:%s:%u]: ",
Line 328 
Line 356 
            Uint32(pegasus_thread_self()),            Uint32(pegasus_thread_self()),
            fileName,            fileName,
            lineNum);            lineNum);
   #endif
         _trace(traceComponent,message,fmt,argList);         _trace(traceComponent,message,fmt,argList);
  
         va_end(argList);         va_end(argList);
Line 359 
Line 388 
         message = new char[ strlen(fileName) +         message = new char[ strlen(fileName) +
                             _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];                             _STRLEN_MAX_UNSIGNED_INT + (_STRLEN_MAX_PID_TID * 2) + 8 ];
  
   #if defined(PEGASUS_OS_VMS)
           //
           // pegasus_thread_self returns long-long-unsigned.
           //
           sprintf(
              message,
              "[%d:%llu:%s:%u]: ",
              System::getPID(),
              pegasus_thread_self(),
              fileName,
              lineNum);
   #else
         sprintf(         sprintf(
            message,            message,
            "[%d:%u:%s:%u]: ",            "[%d:%u:%s:%u]: ",
Line 366 
Line 407 
            Uint32(pegasus_thread_self()),            Uint32(pegasus_thread_self()),
            fileName,            fileName,
            lineNum);            lineNum);
   #endif
         _trace(traceComponent,message,fmt,argList);         _trace(traceComponent,message,fmt,argList);
         va_end(argList);         va_end(argList);
  
Line 413 
Line 455 
     // Construct the message header     // Construct the message header
     // The message header is in the following format     // The message header is in the following format
     // timestamp: <component name> [file name:line number]     // timestamp: <component name> [file name:line number]
     if (strcmp(message,"") != 0)      if (*message != '\0')
     {     {
        // << Wed Jul 16 10:58:40 2003 mdd >> _STRLEN_MAX_PID_TID is not used in this format string        // << Wed Jul 16 10:58:40 2003 mdd >> _STRLEN_MAX_PID_TID is not used in this format string
        msgHeader = new char [strlen(message)        msgHeader = new char [strlen(message)
Line 436 
Line 478 
         // Needs to be updated if additional info is added         // Needs to be updated if additional info is added
         //         //
         tmpBuffer = new char[_STRLEN_MAX_PID_TID + 6];         tmpBuffer = new char[_STRLEN_MAX_PID_TID + 6];
   #if defined(PEGASUS_OS_VMS)
           //
           // pegasus_thread_self returns long-long-unsigned.
           //
           sprintf(tmpBuffer, "[%u:%llu]: ", System::getPID(),
                   pegasus_thread_self());
   #else
         sprintf(tmpBuffer, "[%u:%u]: ", System::getPID(),         sprintf(tmpBuffer, "[%u:%u]: ", System::getPID(),
                 Uint32(pegasus_thread_self()));                 Uint32(pegasus_thread_self()));
   #endif
         msgHeader = new char [ strlen(timeStamp) + strlen(TRACE_COMPONENT_LIST[traceComponent]) +         msgHeader = new char [ strlen(timeStamp) + strlen(TRACE_COMPONENT_LIST[traceComponent]) +
                                strlen(tmpBuffer) + 1  + 5 ];                                strlen(tmpBuffer) + 1  + 5 ];
  
Line 593 
Line 643 
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 Uint32 Tracer::setTraceFile(const char* traceFile) Uint32 Tracer::setTraceFile(const char* traceFile)
 { {
       if (*traceFile == 0)
       {
           return 1;
       }
   
     String moduleName = _getInstance()->_moduleName;     String moduleName = _getInstance()->_moduleName;
     if (moduleName == String::EMPTY)     if (moduleName == String::EMPTY)
     {     {


Legend:
Removed from v.1.23  
changed lines
  Added in v.1.28

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2