Writes out the supplied chain to the logfile 'as is' with no time-stamp or other supporting information.

Return TypeFunction nameArguments
hzEcodehzLogger::Log(hzChain&,)

Declared in file: hzProcess.h
Defined in file : hzLogger.cpp

Function Logic:

0:START 1:unknown 2:items items 3:unknown 4:unknown 5:items 6:items items 7:unknown 8:items 9:items 10:unknown 11:unknown 12:* 13:unknown 14:m_pDataPtr rc 15:items 16:Return rc

Function body:

hzEcode hzLogger::Log (hzChain& Z)
{
   //  Writes out the supplied chain to the logfile 'as is' with no time-stamp or other supporting information.
   //  
   //  Arguments: 1) Z Chain to output to logfile
   //  
   //  Returns: E_SENDFAIL If logging is to the logserver and could not be sent
   //     E_RECVFAIL If logging is to the logserver and acknowledgemnt was not recieved
   //     E_PROTOCOL If logging is to the logserver and said logserver did not observe protocol
   //     E_OK  If the log action was completed
   hzChain::Iter   zi ;        //  Message chain iterator
   char*       i ;             //  For population of buffer
   int32_t     n ;             //  Indent counter
   uint32_t    nBytes ;        //  Number of bytes in buffer
   hzEcode     rc = E_OK ;     //  Return code
   //  m_Temp.Clear() ;
   if (Z.Size())
   {
       m_Lock.Lock() ;
       _logrotate() ;
       if (m_bVerbose)
       {
           for (n = m_nIndent ; n ; n--)
               printf("\t") ;
           printf("T%uL%02d %09lu: %04d/%02d/%02d-%02d:%02d:%02d.%06d %s:\t",
               _hzGlobal_currProc->GetId(),
               _hzGlobal_currProc->Level(),
               _hzGlobal_currProc->FuncCallSeq(),
               m_datCurr.Year(), m_datCurr.Month(), m_datCurr.Day(), m_datCurr.Hour(), m_datCurr.Min(), m_datCurr.Sec(), m_datCurr.uSec(),
               _hzGlobal_currProc->GetCurrFunc()) ;
           std::cout << Z ;
       }
       //  Write to file
       for (n = m_nIndent ; n ; n--)
           fprintf(m_pFile, "\t") ;
       fprintf(m_pFile, "T%uL%02d %09lu: %04d/%02d/%02d-%02d:%02d:%02d.%06d %s:\t",
           _hzGlobal_currProc->GetId(),
           _hzGlobal_currProc->Level(),
               _hzGlobal_currProc->FuncCallSeq(),
           m_datCurr.Year(), m_datCurr.Month(), m_datCurr.Day(), m_datCurr.Hour(), m_datCurr.Min(), m_datCurr.Sec(), m_datCurr.uSec(),
           _hzGlobal_currProc->GetCurrFunc()) ;
       for (zi = Z ; rc == E_OK && !zi.eof() ;)
       {
           for (i = m_pDataPtr, nBytes = 0; !zi.eof() && nBytes < HZ_LOGCHUNK ; nBytes++, zi++)
               *i++ = *zi ;
           if (!nBytes)
               break ;
           m_pDataPtr[nBytes] = 0;
           rc = _write(nBytes) ;
       }
       m_Lock.Unlock() ;
   }
   return rc ;
}