|
Pico-Arduino
|
A simple Logger that writes messages dependent on the log level. More...
#include <PicoLogger.h>
Public Types | |
| enum | LogLevel { Debug , Info , Warning , Error } |
| Supported log levels. You can change the default log level with the help of the PICO_LOG_LEVEL define. | |
Public Member Functions | |
| virtual void | begin (Stream &out, LogLevel level=PICO_LOG_LEVEL) |
| activate the logging | |
| virtual void | debug (const char *str, const char *str1=nullptr, const char *str2=nullptr) |
| writes an debug message | |
| virtual void | error (const char *str, const char *str1=nullptr, const char *str2=nullptr) |
| logs an error | |
| virtual void | info (const char *str, const char *str1=nullptr, const char *str2=nullptr) |
| logs an info message | |
| virtual bool | isLogging (LogLevel level=Info) |
| checks if the logging is active | |
| virtual void | log (LogLevel current_level, const char *str, const char *str1=nullptr, const char *str2=nullptr) |
| write an message to the log | |
| virtual int | printf (LogLevel current_level, const char *fmt,...) |
| printf support | |
| virtual void | warning (const char *str, const char *str1=nullptr, const char *str2=nullptr) |
| logs an warning | |
Protected Attributes | |
| LogLevel | log_level |
| Stream * | log_stream_ptr |
A simple Logger that writes messages dependent on the log level.