esp32cam
OV2640 camera on ESP32-CAM
Loading...
Searching...
No Matches
src
esp32cam
logger.hpp
Go to the documentation of this file.
1
#ifndef ESP32CAM_LOGGER_HPP
2
#define ESP32CAM_LOGGER_HPP
3
4
#include <Arduino.h>
5
6
namespace
esp32cam
{
7
8
extern
Print*
LogOutput
;
9
14
inline
void
15
setLogger
(Print& output) {
16
LogOutput
= &output;
17
}
18
19
#define ESP32CAM_LOG(fmt, ...) \
20
do { \
21
if (LogOutput != nullptr) { \
22
LogOutput->printf("[%8lu] " fmt "\n", millis(), ##__VA_ARGS__); \
23
} \
24
} while (false)
25
26
}
// namespace esp32cam
27
28
#endif
// ESP32CAM_LOGGER_HPP
esp32cam
Definition
esp32cam.h:14
esp32cam::LogOutput
Print * LogOutput
Definition
camera.cpp:8
esp32cam::setLogger
void setLogger(Print &output)
Set logger output.
Definition
logger.hpp:15
Generated by
1.9.8