aboutsummaryrefslogtreecommitdiffstats
path: root/src/debug.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-12-03 01:04:40 +0100
committerSven Gothel <[email protected]>2020-12-03 01:04:40 +0100
commitd58e728d905e06f010b77805cf763a8d0c5c8bfd (patch)
treede6e2994ee521e7ae5f0a96a5fce2472b286ecf1 /src/debug.cpp
parent092e92cf1f6c9ae904f0f2435dc246d4b12b0519 (diff)
debug.hpp: Have PLAIN_PRINT(..) only optionally print the prefix
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index 29cdd6a..3741418 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -172,8 +172,10 @@ void jau::INFO_PRINT(const char * format, ...) noexcept {
fflush(stderr);
}
-void jau::PLAIN_PRINT(const char * format, ...) noexcept {
- fprintf(stderr, "[%s] ", jau::uint64DecString(environment::getElapsedMillisecond(), ',', 9).c_str());
+void jau::PLAIN_PRINT(const bool printPrefix, const char * format, ...) noexcept {
+ if( printPrefix ) {
+ fprintf(stderr, "[%s] ", jau::uint64DecString(environment::getElapsedMillisecond(), ',', 9).c_str());
+ }
va_list args;
va_start (args, format);
vfprintf(stderr, format, args);