LoggerInterface inspired by PHP PSR-3

Dependents:   LogIt

Revision:
0:13d1767f0c98
Child:
1:8ee5fd3c1bf1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LoggerInterface.h	Thu Nov 24 13:16:44 2016 +0000
@@ -0,0 +1,83 @@
+
+#include <stdarg.h>
+
+namespace Log;
+
+class LoggerInterface
+{
+    public:
+    /**
+     * System is unusable.
+     *
+     * @param string $message
+     */
+    void emergency(char* message, ...) = null;
+
+    /**
+     * Action must be taken immediately.
+     *
+     * Example: Entire website down, database unavailable, etc. This should
+     * trigger the SMS alerts and wake you up.
+     *
+     * @param string $message
+     */
+    void alert(char* message, ...) = null;
+
+    /**
+     * Critical conditions.
+     *
+     * Example: Application component unavailable, unexpected exception.
+     *
+     * @param string $message
+     */
+    void critical(char* message, ...) = null;
+
+    /**
+     * Runtime errors that do not require immediate action but should typically
+     * be logged and monitored.
+     *
+     * @param string $message
+     */
+    void error(char* message, ...) = null;
+
+    /**
+     * Exceptional occurrences that are not errors.
+     *
+     * Example: Use of deprecated APIs, poor use of an API, undesirable things
+     * that are not necessarily wrong.
+     *
+     * @param string $message
+     */
+    void warning(char* message, ...) = null;
+
+    /**
+     * Normal but significant events.
+     *
+     * @param string $message
+     */
+    void notice(char* message, ...) = null;
+
+    /**
+     * Interesting events.
+     *
+     * Example: User logs in, SQL logs.
+     *
+     * @param string $message
+     */
+    void info(char* message, ...) = null;
+
+    /**
+     * Detailed debug information.
+     *
+     * @param string $message
+     */
+    void debug(char* message, ...) = null;
+
+    /**
+     * Logs with an arbitrary level.
+     *
+     * @param mixed $level
+     * @param string $message
+     */
+    void log(Level level, char* message, ...) = null;
+}
\ No newline at end of file