XenevaOS
Loading...
Searching...
No Matches
XenevaOS
Process
VideoPlayer
libhelix-aac
utils
helix_log_idf.h
Go to the documentation of this file.
1
#pragma once
2
#include "../ConfigHelix.h"
3
#include "esp_log.h"
4
5
// Logging Implementation
6
#if HELIX_LOGGING_ACTIVE
7
#define TAG_HELIX "libhelix"
8
// Unlike helix_log_std.h's LOG_HELIX macro, ESP_LOGx() is not filtered
9
// by HELIX_LOG_LEVEL - without this check every LOGI_HELIX/LOGD_HELIX
10
// call (there's one or more per decoded frame) unconditionally emits at
11
// esp-idf's INFO/DEBUG level, which is easily slow enough over UART to
12
// starve a real-time audio decode task and cause dropped packets.
13
enum class
LogLevelHelix {Debug, Info, Warning, Error};
14
static
LogLevelHelix LOGLEVEL_HELIX =
HELIX_LOG_LEVEL
;
15
#define LOGD_HELIX(...) { if (LogLevelHelix::Debug >= LOGLEVEL_HELIX) ESP_LOGD(TAG_HELIX,__VA_ARGS__); }
16
#define LOGI_HELIX(...) { if (LogLevelHelix::Info >= LOGLEVEL_HELIX) ESP_LOGI(TAG_HELIX,__VA_ARGS__); }
17
#define LOGW_HELIX(...) { if (LogLevelHelix::Warning >= LOGLEVEL_HELIX) ESP_LOGW(TAG_HELIX,__VA_ARGS__); }
18
#define LOGE_HELIX(...) { if (LogLevelHelix::Error >= LOGLEVEL_HELIX) ESP_LOGE(TAG_HELIX,__VA_ARGS__); }
19
#else
20
// Remove all log statments from the code
21
#define LOGD_HELIX(...)
22
#define LOGI_HELIX(...)
23
#define LOGW_HELIX(...)
24
#define LOGE_HELIX(...)
25
#endif
26
HELIX_LOG_LEVEL
#define HELIX_LOG_LEVEL
Definition
ConfigHelix.h:43
Generated by
1.9.8