LoggerInterface inspired by PHP PSR-3
Fork of LoggerInterface by
Revision 3:8b20cda3dee5, committed 2016-12-14
- Comitter:
- Nico De Witte
- Date:
- Wed Dec 14 17:57:03 2016 +0100
- Parent:
- 2:97f331aa4938
- Commit message:
- Change message from char * to const char * as it should. Also removing a lot of compiler warnings like this.
Changed in this revision
LoggerInterface.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 97f331aa4938 -r 8b20cda3dee5 LoggerInterface.h --- a/LoggerInterface.h Wed Dec 07 19:55:36 2016 +0000 +++ b/LoggerInterface.h Wed Dec 14 17:57:03 2016 +0100 @@ -5,15 +5,15 @@ class LoggerInterface { public: - + enum Level {EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG}; - + /** * System is unusable. * * @param string $message */ - virtual void emergency(char* message, ...) = 0; + virtual void emergency(const char * message, ...) = 0; /** * Action must be taken immediately. @@ -23,7 +23,7 @@ * * @param string $message */ - virtual void alert(char* message, ...) = 0; + virtual void alert(const char * message, ...) = 0; /** * Critical conditions. @@ -32,7 +32,7 @@ * * @param string $message */ - virtual void critical(char* message, ...) = 0; + virtual void critical(const char * message, ...) = 0; /** * Runtime errors that do not require immediate action but should typically @@ -40,7 +40,7 @@ * * @param string $message */ - virtual void error(char* message, ...) = 0; + virtual void error(const char * message, ...) = 0; /** * Exceptional occurrences that are not errors. @@ -50,14 +50,14 @@ * * @param string $message */ - virtual void warning(char* message, ...) = 0; + virtual void warning(const char * message, ...) = 0; /** * Normal but significant events. * * @param string $message */ - virtual void notice(char* message, ...) = 0; + virtual void notice(const char * message, ...) = 0; /** * Interesting events. @@ -66,14 +66,14 @@ * * @param string $message */ - virtual void info(char* message, ...) = 0; + virtual void info(const char * message, ...) = 0; /** * Detailed debug information. * * @param string $message */ - virtual void debug(char* message, ...) = 0; + virtual void debug(const char * message, ...) = 0; /** * Logs with an arbitrary level. @@ -81,7 +81,7 @@ * @param mixed $level * @param string $message */ - virtual void log(Level level, char* message, ...) = 0; + virtual void log(Level level, const char * message, ...) = 0; }; -} \ No newline at end of file +}