Return TypeFunction nameArguments
hzEcodehzLogger::OpenFile(const char*,hzLogRotate,)

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

Function Logic:

0:START 1:!fpath||!fpath[0] 2:hzexit hzLogger::IsOpen 3:IsOpen() 4:hzexit 5:fpath[0]==(char)47 6:m_Base 7:getcwd cpCWD 8:*cpCWD; 9:* strcpy m_Base 10:m_nSessID m_eRotate m_pDataPtr 11:Return E_OK

Function body:

hzEcode hzLogger::OpenFile (const char* fpath, hzLogRotate eRotate)
{
   _hzfunc("hzLogger::OpenFile") ;
   char    cvDir   [HZ_MAXPATHLEN] ;
   char*   cpCWD ;
   if (!fpath || !fpath[0])
       hzexit(E_ARGUMENT, "No path supplied") ;
   if (IsOpen())
       hzexit(E_INITDUP, "%s: This log channel is already open", fpath) ;
   if (fpath[0]== CHAR_FWSLASH)
       m_Base = fpath ;
   else
   {
       cpCWD = getcwd(cvDir, HZ_MAXPATHLEN) ;
       for (; *cpCWD ; cpCWD++) ;
       *cpCWD++ = CHAR_FWSLASH ;
       strcpy(cpCWD, fpath) ;
       m_Base = cvDir ;
   }
   m_nSessID = 0;
   m_eRotate = eRotate ;
   m_pDataPtr = m_cvData ;
   return E_OK ;
}