logs: lower logfile error to warning
authorRobert Swiecki <robert@swiecki.net>
Thu, 7 Jun 2018 14:57:43 +0000 (16:57 +0200)
committerRobert Swiecki <robert@swiecki.net>
Thu, 7 Jun 2018 14:57:43 +0000 (16:57 +0200)
logs.cc

diff --git a/logs.cc b/logs.cc
index 3fd0125..147047b 100644 (file)
--- a/logs.cc
+++ b/logs.cc
@@ -78,10 +78,10 @@ void logFile(const std::string& logfile) {
                                           O_CREAT | O_RDWR | O_APPEND | O_CLOEXEC, 0640)) == -1) {
                        _log_fd = STDERR_FILENO;
                        _log_fd_isatty = (isatty(_log_fd) == 1 ? true : false);
-                       PLOG_E("Couldn't open logfile open('%s')", logfile.c_str());
+                       PLOG_W("Couldn't open logfile open('%s')", logfile.c_str());
                }
        }
-       _log_fd_isatty = (isatty(_log_fd) == 1 ? true : false);
+       _log_fd_isatty = (isatty(_log_fd) == 1);
 }
 
 void logMsg(enum llevel_t ll, const char* fn, int ln, bool perr, const char* fmt, ...) {