|
%s
|
string (char*)
|
|
%S
|
string from flash memory (char[] PROGMEM)
|
|
%c
|
single character
|
|
%C
|
signel character (hex if not printable)
|
|
%d
|
integer
|
|
%l
|
long
|
|
%u
|
unsigned long
|
|
%x
|
hexadecimal
|
|
%X
|
hexadecimal (0x prefix) and leading zeros
|
|
%b
|
binary number
|
|
%B
|
binary number (0b prefix)
|
|
%t
|
boolean 't' or 'f'
|
|
%T
|
boolean 'true' or 'false'
|
|
%D, %F
|
double
|
|
%p
|
printable object
|
Serial.begin(9600);
// Initialize with log level and log output.
Log.begin (LOG_giLEVEL_VERBOSE, &Serial);
|
LOG_LEVEL_SILENT
|
no output
|
|
LOG_LEVEL_FATAL
|
fatal errors
|
|
LOG_LEVEL_ERROR
|
all errors
|
|
LOG_LEVEL_WARNING
|
errors and warnings
|
|
LOG_LEVEL_NOTICE
|
errors, warnings and notices
|
|
LOG_LEVEL_TRACE
|
errors, warnings, notices and traces
|
|
LOG_LEVEL_VERBOSE
|
all
|
Log.setPrefix(printPrefix);
Log.setSuffix(printSuffix);
Log.notice("Message to be logged");
void printPrefix(Print* _logOutput, int logLevel) {
_logOutput->print("00:47:51.432 ");
}
void printSuffix(Print* _logOutput, int logLevel) {
_logOutput->print(".");
}
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.