RF24Log  0.1.3
Unified logging library
Public Member Functions | Protected Member Functions | List of all members
NativePrintLogger Class Reference

Class to manage logging messages to a printf function pointer. More...

#include <NativePrintLogger.h>

Inheritance diagram for NativePrintLogger:
RF24LogPrintfParser RF24LogAbstractHandler RF24LogAbstractStream RF24LogBaseHandler

Public Member Functions

 NativePrintLogger ()
 Construct a new NativePrintLogger object using stdout.
 
- Public Member Functions inherited from RF24LogAbstractHandler
 RF24LogAbstractHandler ()
 Sets log level to INFO upon instantiation.
 
void log (uint8_t logLevel, const char *vendorId, const char *message, va_list *args)
 log a message. More...
 
void setLogLevel (uint8_t logLevel)
 

Protected Member Functions

void appendTimestamp ()
 output a timestamp
 
void appendChar (char data, uint16_t depth=1)
 append a character a number of times More...
 
void appendInt (long data)
 append a signed (+/-) number More...
 
void appendUInt (unsigned long data, uint8_t base=10)
 append an ‘unsigned’ (only +) number More...
 
void appendDouble (double data, uint8_t precision=2)
 append a floating point number More...
 
void appendStr (const char *data)
 append a c-string More...
 
- Protected Member Functions inherited from RF24LogPrintfParser
void write (uint8_t logLevel, const char *vendorId, const char *message, va_list *args)
 
- Protected Member Functions inherited from RF24LogAbstractStream
void appendLogLevel (uint8_t logLevel)
 output a description of the log level More...
 
void descTimeLevel (uint8_t logLevel)
 Automate the output of the header' timestamp and level description. More...
 
void appendFormat (FormatSpecifier *fmt_parser, va_list *args)
 output a data according to the format specifier More...
 

Additional Inherited Members

- Protected Attributes inherited from RF24LogAbstractHandler
uint8_t _logLevel
 

Detailed Description

Class to manage logging messages to a printf function pointer.

Definition at line 28 of file NativePrintLogger.h.

Member Function Documentation

◆ appendChar()

void NativePrintLogger::appendChar ( char  data,
uint16_t  depth = 1 
)
protectedvirtual

append a character a number of times

Parameters
dataThe char to use
depthThe number of times that the data is sequentially output.

Implements RF24LogAbstractStream.

Definition at line 52 of file NativePrintLogger.cpp.

◆ appendDouble()

void NativePrintLogger::appendDouble ( double  data,
uint8_t  precision = 2 
)
protectedvirtual

append a floating point number

Parameters
dataThe numeric data
precisionThe number of decimals places to output

Implements RF24LogAbstractStream.

Definition at line 110 of file NativePrintLogger.cpp.

◆ appendInt()

void NativePrintLogger::appendInt ( long  data)
protectedvirtual

append a signed (+/-) number

Parameters
dataThe numeric data

Implements RF24LogAbstractStream.

Definition at line 63 of file NativePrintLogger.cpp.

◆ appendStr()

void NativePrintLogger::appendStr ( const char *  data)
protectedvirtual

append a c-string

Parameters
dataThe c-string data

Implements RF24LogAbstractStream.

Definition at line 119 of file NativePrintLogger.cpp.

◆ appendUInt()

void NativePrintLogger::appendUInt ( unsigned long  data,
uint8_t  base = 10 
)
protectedvirtual

append an ‘unsigned’ (only +) number

Parameters
dataThe numeric data
baseThe base counting scheme. Defaults to 10 for decimal counting system

Implements RF24LogAbstractStream.

Definition at line 71 of file NativePrintLogger.cpp.


The documentation for this class was generated from the following files: