|
SC16IS752 Serial Bridge Arduino Library
|
Simple logger for SC16IS752 channels with variadic parameter support and log levels. More...
#include <SC16IS752Logger.h>
Public Types | |
| enum | LogLevel { LEVEL_DEBUG = 0 , LEVEL_INFO = 1 , LEVEL_WARNING = 2 , LEVEL_ERROR = 3 , LEVEL_CRITICAL = 4 , LEVEL_NONE = 5 } |
| Log levels. | |
Public Member Functions | |
| SC16IS752Logger (Stream &stream, LogLevel level=LEVEL_INFO) | |
| void | setLogLevel (LogLevel level) |
| Set the current log level. | |
| LogLevel | getLogLevel () |
| Get the current log level. | |
| void | debug (const char *format,...) |
| Log a formatted debug message. | |
| void | info (const char *format,...) |
| Log a formatted info message. | |
| void | warn (const char *format,...) |
| Log a formatted warning message. | |
| void | error (const char *format,...) |
| Log a formatted error message. | |
| void | critical (const char *format,...) |
| Log a formatted critical message. | |
| void | log (const char *format,...) |
| Log a formatted message with variadic parameters (respects log level LEVEL_DEBUG) | |
| void | logln (const char *format,...) |
| Log with newline (respects log level LEVEL_DEBUG) | |
| void | write (const char *str) |
| Log a simple string. | |
| void | write (char c) |
| Log a single character. | |
| void | write (int value) |
| Log an integer. | |
| void | write (unsigned int value) |
| Log an unsigned integer. | |
| void | write (long value) |
| Log a long integer. | |
| void | write (unsigned long value) |
| Log an unsigned long integer. | |
| void | write (float value) |
| Log a floating point number. | |
| void | write (float value, int precision) |
| Log a floating point number with precision. | |
| void | newline () |
| Log a newline. | |
Simple logger for SC16IS752 channels with variadic parameter support and log levels.