add debugging to logging
This commit is contained in:
parent
4df8cdc685
commit
2e11c12d73
|
@ -402,10 +402,14 @@ void Logger::logFile( const std::string &logFile ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Logger::openFile() {
|
void Logger::openFile() {
|
||||||
if ( mLogFile.size() && (mLogFileFP = fopen( mLogFile.c_str() ,"a" )) == (FILE *)NULL ) {
|
if ( mLogFile.size() ) {
|
||||||
|
if ( (mLogFileFP = fopen(mLogFile.c_str() ,"a")) == (FILE *)NULL ) {
|
||||||
mFileLevel = NOLOG;
|
mFileLevel = NOLOG;
|
||||||
Fatal( "fopen() for %s, error = %s", mLogFile.c_str(), strerror(errno) );
|
Fatal( "fopen() for %s, error = %s", mLogFile.c_str(), strerror(errno) );
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
puts("Called Logger::openFile() without a filename");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Logger::closeFile() {
|
void Logger::closeFile() {
|
||||||
|
@ -524,6 +528,8 @@ void Logger::logPrint( bool hex, const char * const filepath, const int line, co
|
||||||
} else {
|
} else {
|
||||||
puts("Logging to file, but file not open\n");
|
puts("Logging to file, but file not open\n");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
puts("Not logging to file because level <= mFileLevel");
|
||||||
}
|
}
|
||||||
*syslogEnd = '\0';
|
*syslogEnd = '\0';
|
||||||
if ( level <= mDatabaseLevel ) {
|
if ( level <= mDatabaseLevel ) {
|
||||||
|
|
Loading…
Reference in New Issue