arduino-audio-tools
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
audio_tools::AudioLogger Class Reference

A simple Logger that writes messages dependent on the log level. More...

#include <AudioLogger.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. More...
 

Public Member Functions

void begin (Stream &out, LogLevel level=LOG_LEVEL)
 activate the logging
 
bool isLogging (LogLevel level=Info)
 checks if the logging is active
 
LogLevel level ()
 
AudioLoggerprefix (const char *file, int line, LogLevel current_level)
 
void println ()
 
char * str ()
 

Static Public Member Functions

static AudioLoggerinstance ()
 provides the singleton instance
 

Protected Member Functions

const char * levelName (LogLevel level) const
 
void lock ()
 
int printPrefix (const char *file, int line, LogLevel current_level) const
 
void unlock ()
 

Protected Attributes

LogLevel log_level = LOG_LEVEL
 
Streamlog_stream_ptr = &LOG_STREAM
 
char print_buffer [LOG_PRINTF_BUFFER_SIZE]
 
const char * TAG = "AudioTools"
 

Detailed Description

A simple Logger that writes messages dependent on the log level.

Author
Phil Schatzmann

Member Enumeration Documentation

◆ LogLevel

Supported log levels. You can change the default log level with the help of the PICO_LOG_LEVEL define.


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