Commit 98a5375a52bcf802cd8de368dbe62b5488386abe
1 parent
5f026592
Log the change from stdout to logfile
Showing
1 changed file
with
2 additions
and
0 deletions
logger.cpp
| @@ -94,6 +94,8 @@ void Logger::reOpen() | @@ -94,6 +94,8 @@ void Logger::reOpen() | ||
| 94 | // I want all messages logged during app startup to also show on stdout/err, otherwise failure can look so silent. So, call this when the app started. | 94 | // I want all messages logged during app startup to also show on stdout/err, otherwise failure can look so silent. So, call this when the app started. |
| 95 | void Logger::noLongerLogToStd() | 95 | void Logger::noLongerLogToStd() |
| 96 | { | 96 | { |
| 97 | + if (!logPath.empty()) | ||
| 98 | + logf(LOG_INFO, "Switching logging from stdout to logfile '%s'", logPath.c_str()); | ||
| 97 | alsoLogToStd = false; | 99 | alsoLogToStd = false; |
| 98 | } | 100 | } |
| 99 | 101 |