LoboMQ
Loading...
Searching...
No Matches
Logger.h
Go to the documentation of this file.
1
9#ifndef LOGGER_H
10
11#define LOGGER_H
12
13#include <iostream>
14#include <SD.h>
15#include <SPI.h>
16
17#include <Elog.h>
18
19#define DEFAULT_LOG_LEVEL Loglevel::INFO
20
35
47Elog *initializeSerialLogger(LoggerClass className, Loglevel level = DEFAULT_LOG_LEVEL);
48
63Elog *initializeSDLogger(LoggerClass className, int cs, int sck, int miso, int mosi,
64 Loglevel level = DEFAULT_LOG_LEVEL);
65
73Elog *disableLogger();
74
75#endif
Elog * disableLogger()
Creates a logger without the ability to print messages.
Definition Logger.cpp:52
LoggerClass
Enumerates every log class that represents the part of the library which is being logged.
Definition Logger.h:25
@ SUBSCRIBER
Subscriber log class.
Definition Logger.h:31
@ BROKER
Broker log class.
Definition Logger.h:27
@ UNKNOWN
Log class unknown or generic.
Definition Logger.h:33
@ PUBLISHER
Publisher log class.
Definition Logger.h:29
Elog * initializeSerialLogger(LoggerClass className, Loglevel level=DEFAULT_LOG_LEVEL)
Creates a logger that prints messages to the serial monitor.
Definition Logger.cpp:13
Elog * initializeSDLogger(LoggerClass className, int cs, int sck, int miso, int mosi, Loglevel level=DEFAULT_LOG_LEVEL)
Creates a logger that prints messages to a file inside a SD card.
Definition Logger.cpp:34