myLog copy 2 - #include "myLog.h" c const enum...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#include "myLog.h" # const enum myLog::logLevels DEFAULT_LOG_LEVEL = myLog::LEVEL_1; c myLog::myLog() { initVars(); init(); } } { initVars(); init(fileName); } { initVars(); logLevel = levelIn; init(fileName); } myLog::~myLog() { if ( logLevel<QUIET_MODE ) { clear(ios::goodbit); *this << endl; printHeader(1); // add ending time to log file } close(); } { if ( (fileName.c_str())[0] ) openLog(fileName,LOG_WRITE); else openLog("syslog.log",LOG_WRITE); } { if ( (fileName.c_str())[0] ) openLog(fileName,mode); else openLog("syslog.log", mode); } void myLog::init() { openLog("syslog.log",LOG_WRITE); } { if (logLevel < QUIET_MODE) {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
open(fileName.c_str(),mode); // fail() returns a null zero when operation fails // rc = (*this).fail(); if ( fail() == 0 )
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

myLog copy 2 - #include &quot;myLog.h&quot; c const enum...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online