diff options
Diffstat (limited to 'src/logger.cpp')
-rw-r--r-- | src/logger.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/logger.cpp b/src/logger.cpp index 5cd65b6..ef712dd 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -66,6 +66,18 @@ void logRaw(const Node *const node, va_end(ap); } +void error(const char *const text, + ...) +{ + va_list ap; + va_start(ap, text); + + vfprintf(stderr, text, ap); + fprintf(stderr, "\n"); + + va_end(ap); +} + void logInt(const Node *const node, const char *const text, const int val) |