Skip to content

Commit 8c2d888

Browse files
committed
controller: add MIST_NO_PRETTY_LOGGING
1 parent 32a8a05 commit 8c2d888

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/controller/controller.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,11 @@ int main_loop(int argc, char **argv){
378378
msghandler.detach();
379379
// Attempt to open and redirect log messages to named pipe
380380
int outFD = -1;
381-
if ((outFD = open(logPipe.c_str(), O_WRONLY)) == -1){
381+
if (getenv("MIST_NO_PRETTY_LOGGING")) {
382+
WARN_MSG(
383+
"MIST_NO_PRETTY_LOGGING is active, printing lots of pipes");
384+
}
385+
else if ((outFD = open(logPipe.c_str(), O_WRONLY)) == -1){
382386
ERROR_MSG(
383387
"Could not open log message pipe %s for writing! %s; falling back to standard error",
384388
logPipe.c_str(), strerror(errno));

0 commit comments

Comments
 (0)