diff options
author | Tobias Klauser <tobias.klauser@uzh.ch> | 2013-02-22 16:28:11 +0100 |
---|---|---|
committer | Tobias Klauser <tobias.klauser@uzh.ch> | 2013-02-22 16:28:11 +0100 |
commit | 4b64fef4c41ae4432eb00b8b814ed4d4d746f794 (patch) | |
tree | 6fcf6fa13f946de4f0ab641a46ef684d2f1726be | |
parent | 97b46a1192352c564eabb841c21ad1284ad1d51b (diff) |
Logger: Add warn() method
-rw-r--r-- | Logger.cpp | 12 | ||||
-rw-r--r-- | Logger.h | 1 |
2 files changed, 13 insertions, 0 deletions
@@ -45,6 +45,18 @@ int Logger::log(const char *fmt, ...) return ret; } +int Logger::warn(const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start(ap, fmt); + ret = _log_vfprintf(_f_err, "Warning", fmt, ap); + va_end(ap); + + return ret; +} + int Logger::err(const char *fmt, ...) { va_list ap; @@ -25,6 +25,7 @@ public: } int log(const char *fmt, ...); + int warn(const char *fmt, ...); int err(const char *fmt, ...); private: Logger() : _f_out(stdout), _f_err(stderr) { } |