Stream operator so that an entire hzChain contents can be output to the logfile.

Return TypeFunction nameArguments
hzLogger&hzLogger::operator<<(hzChain&,)

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

Function Logic:

0:START 1:unknown 2:items items 3:unknown 4:items items 5:zi 6:unknown 7:unknown 8:* 9:unknown 10:m_pDataPtr rc 11:items 12:Return *this

Function body:

hzLogger& hzLogger::operator<< (hzChain& Z)
{
   //  Stream operator so that an entire hzChain contents can be output to the logfile.
   //  
   //  Arguments: 1) Z Chain to aggregate to logger
   //  
   //  Returns: Reference to this logger
   //  _hzfunc("hzLogger::operator<<(hzChain)") ;
   hzChain::Iter   zi ;        //  Message chain iterator
   char*       i ;             //  For population of buffer
   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)
       {
           std::cout.write(m_pDataPtr, nBytes) ;
           fflush(stdout) ;
       }
       zi = Z ;
       for (; rc == E_OK ;)
       {
           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 *this ;
}