diff options
author | Sven Gothel <[email protected]> | 2020-12-03 01:04:40 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-12-03 01:04:40 +0100 |
commit | d58e728d905e06f010b77805cf763a8d0c5c8bfd (patch) | |
tree | de6e2994ee521e7ae5f0a96a5fce2472b286ecf1 /src/debug.cpp | |
parent | 092e92cf1f6c9ae904f0f2435dc246d4b12b0519 (diff) |
debug.hpp: Have PLAIN_PRINT(..) only optionally print the prefix
Diffstat (limited to 'src/debug.cpp')
-rw-r--r-- | src/debug.cpp | 6 |
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); |