Serial output logger based on the LoggerInterface
LogIt.h@1:5c3eeae51c21, 2017-03-31 (annotated)
- Committer:
- Sille Van Landschoot
- Date:
- Fri Mar 31 15:40:15 2017 +0200
- Revision:
- 1:5c3eeae51c21
- Parent:
- 0:0c84a9b17408
- Child:
- 3:5613e6675dae
use const char instead of char
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sille Van Landschoot |
1:5c3eeae51c21 | 1 | #pragma once |
Sille Van Landschoot |
1:5c3eeae51c21 | 2 | |
sillevl | 0:0c84a9b17408 | 3 | #include "LoggerInterface.h" |
sillevl | 0:0c84a9b17408 | 4 | #include "mbed.h" |
sillevl | 0:0c84a9b17408 | 5 | |
sillevl | 0:0c84a9b17408 | 6 | class LogIt : public Log::LoggerInterface |
sillevl | 0:0c84a9b17408 | 7 | { |
sillevl | 0:0c84a9b17408 | 8 | public: |
Sille Van Landschoot |
1:5c3eeae51c21 | 9 | LogIt(mbed::Serial* serial); |
Sille Van Landschoot |
1:5c3eeae51c21 | 10 | void emergency(const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 11 | void alert(const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 12 | void critical(const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 13 | void error(const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 14 | void warning(const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 15 | void notice(const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 16 | void info(const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 17 | void debug(const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 18 | void log(Level level, const char* message, ...); |
Sille Van Landschoot |
1:5c3eeae51c21 | 19 | |
sillevl | 0:0c84a9b17408 | 20 | void setLevel(Level level); |
Sille Van Landschoot |
1:5c3eeae51c21 | 21 | |
sillevl | 0:0c84a9b17408 | 22 | protected: |
Sille Van Landschoot |
1:5c3eeae51c21 | 23 | void log(Level level, const char* message, va_list args); |
Sille Van Landschoot |
1:5c3eeae51c21 | 24 | mbed::Serial* serial; |
sillevl | 0:0c84a9b17408 | 25 | Level level; // minimum level to log |
Sille Van Landschoot |
1:5c3eeae51c21 | 26 | }; |