linuxConsole/mLog.cpp
/*Method to try open specified logfile*/
Method to try open specified logfile
Method to try open specified logfile
int openLogFile(int maxTry)
{
	int tryCount = 0;
	int fd = -1;
	while (fd == -1 && tryCount < maxTry)
	{
		fd = open(logFilePath, O_WRONLY | O_CREAT | O_APPEND, 0666);
		if (fd == -1) { healLogFile(); }
	}
	return fd;
}
int openLogFile ( int maxTry ) { int tryCount = 0 ; int fd = -1 ; while ( fd == -1 && tryCount < maxTry ) { fd = open ( logFilePath , O_WRONLY | O_CREAT | O_APPEND , 0666 ) ; if ( fd == -1 ) { healLogFile ( ) ; } } return fd ; }
Method to try open specified logfile
Method to try open specified logfile
//controling try time //opening file //heal it if needed