Return TypeFunction nameArguments
hzEcodehzLogger::Out(const hzChain&,)

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

Function Logic:

0:START 1:!_hzGlobal_currProc 2:printf exit hzChain::Size 3:Z.Size() 4:hzLockS::Lock hzLogger::_logrotate 5:m_bVerbose 6:items 7:m_pFile 8:rc==E_OK&&!zi.eof(); 9:!zi.eof()&&nBytes 10:* 11:!nBytes 12:m_pDataPtr hzLogger::_write rc 13:hzLockS::Unlock 14:Return rc

Function body:

hzEcode hzLogger::Out (const hzChain& Z)
{
   hzChain::Iter   zi ;
   char*       i ;
   uint32_t    nBytes ;
   hzEcode     rc = E_OK ;
   if (!_hzGlobal_currProc)
   {
       printf("Fatal - no current process\n") ;
       exit(-1);
   }
   if (Z.Size())
   {
       m_Lock.Lock() ;
       _logrotate() ;
       if (m_bVerbose)
           std::cout << Z ;
       if (m_pFile)
       {
           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 ;
}