summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Logger.cpp12
-rw-r--r--Logger.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/Logger.cpp b/Logger.cpp
index b0850a6..b4f6bbf 100644
--- a/Logger.cpp
+++ b/Logger.cpp
@@ -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;
diff --git a/Logger.h b/Logger.h
index 5ee5bd4..85f9f4c 100644
--- a/Logger.h
+++ b/Logger.h
@@ -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) { }