]> jfr.im git - irc/rizon/znc.git/commitdiff
Don't print debug info to stdout with a debug compile if it is not isatty()
authorAdam <redacted>
Sun, 8 Dec 2013 01:37:43 +0000 (20:37 -0500)
committerAdam <redacted>
Sun, 8 Dec 2013 01:37:43 +0000 (20:37 -0500)
ZNCDebug.h

index 4a9682ca60189dfec29979b0f52ff7511fdcf8a8..e8e56fb2e40ff57d91186cc32295e2f6fe9158f9 100644 (file)
@@ -27,7 +27,7 @@ using std::endl;
  *  @param f The expression you want to display.
  */
 #define DEBUG(f) do { \
-       if (CDebug::Debug()) { \
+       if (CDebug::Debug() && CDebug::StdoutIsTTY()) { \
                cout << f << endl; \
        } \
 } while (0)