aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2021-02-28 21:44:33 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-08 08:07:02 +0200
commit90ff3d0256327bd4097568740a0ece24ca722989 (patch)
treeff0752f2b22b3d2ba29659c5ec57f7cdf94f1ac3 /nxcomp/src
parentd7a49834ea4b3fbe9703cdd408b1a4b4a36a1636 (diff)
downloadnx-libs-90ff3d0256327bd4097568740a0ece24ca722989.tar.gz
nx-libs-90ff3d0256327bd4097568740a0ece24ca722989.tar.bz2
nx-libs-90ff3d0256327bd4097568740a0ece24ca722989.zip
nxcomp/Children.cpp: add macro checks around some log/stderr prints
This helps no flooding the output with (double) messages.
Diffstat (limited to 'nxcomp/src')
-rw-r--r--nxcomp/src/Children.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/nxcomp/src/Children.cpp b/nxcomp/src/Children.cpp
index 40eccd9da..842db7fe5 100644
--- a/nxcomp/src/Children.cpp
+++ b/nxcomp/src/Children.cpp
@@ -257,15 +257,17 @@ int NXTransDialog(const char *caption, const char *message,
}
}
- #ifdef WARNING
+ #ifdef TEST
*logofs << "NXTransDialog: WARNING! Couldn't start '"
<< command << "'. " << "Error is " << EGET()
<< " '" << ESTR() << "'.\n" << logofs_flush;
#endif
+ #ifdef WARNING
cerr << "Warning" << ": Couldn't start '" << command
<< "'. Error is " << EGET() << " '" << ESTR()
<< "'.\n";
+ #endif
//
// Retry by looking for the default name
@@ -302,13 +304,15 @@ int NXTransDialog(const char *caption, const char *message,
// FIXME: check if strncat would be better here
snprintf(newPath + newLength, DEFAULT_STRING_LIMIT - newLength, "%s", oldPath);
- #ifdef WARNING
+ #ifdef TEST
*logofs << "NXTransDialog: WARNING! Trying with path '"
<< newPath << "'.\n" << logofs_flush;
#endif
+ #ifdef WARNING
cerr << "Warning" << ": Trying with path '" << newPath
<< "'.\n";
+ #endif
//
// Solaris doesn't seem to have