Serial output logger based on the LoggerInterface
LogIt.h@5:8cd22c68d239, 2017-04-02 (annotated)
- Committer:
- Sille Van Landschoot
- Date:
- Sun Apr 02 13:51:38 2017 +0200
- Revision:
- 5:8cd22c68d239
- Parent:
- 3:5613e6675dae
solve merge bug in LogIt.h
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 |
5:8cd22c68d239 | 9 | LogIt(mbed::Serial* serial); |
Sille Van Landschoot |
5:8cd22c68d239 | 10 | void emergency(const char* message, ...); |
Sille Van Landschoot |
5:8cd22c68d239 | 11 | void alert(const char* message, ...); |
Sille Van Landschoot |
5:8cd22c68d239 | 12 | void critical(const char* message, ...); |
Sille Van Landschoot |
5:8cd22c68d239 | 13 | void error(const char* message, ...); |
Sille Van Landschoot |
5:8cd22c68d239 | 14 | void warning(const char* message, ...); |
Sille Van Landschoot |
5:8cd22c68d239 | 15 | void notice(const char* message, ...); |
Sille Van Landschoot |
5:8cd22c68d239 | 16 | void info(const char* message, ...); |
Sille Van Landschoot |
5:8cd22c68d239 | 17 | void debug(const char* message, ...); |
Sille Van Landschoot |
5:8cd22c68d239 | 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 |
5:8cd22c68d239 | 23 | void log(Level level, const char* message, va_list args); |
Sille Van Landschoot |
5:8cd22c68d239 | 24 | mbed::Serial* serial; |
sillevl | 0:0c84a9b17408 | 25 | Level level; // minimum level to log |
Sille Van Landschoot |
1:5c3eeae51c21 | 26 | }; |