| 53 | } |
| 54 | |
| 55 | Log::~Log() |
| 56 | { |
| 57 | os << std::endl; |
| 58 | |
| 59 | if(getOutput() == NULL) |
| 60 | { |
| 61 | std::cerr << "ERROR - tried to write to log file before it was open!\n"; |
| 62 | return; |
| 63 | } |
| 64 | |
| 65 | fprintf(getOutput(), "%s", os.str().c_str()); |
| 66 | |
| 67 | //if it's an error, also print to console |
| 68 | //print all messages if using --debug |
| 69 | if(messageLevel == LogError || reportingLevel >= LogDebug) |
| 70 | fprintf(stderr, "%s", os.str().c_str()); |
| 71 | } |
nothing calls this directly
no outgoing calls
no test coverage detected