mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-03 21:53:18 +00:00
This way i most usual rate_ctr related internal logging is disabled by default (notice), and it can b eeasily enabled by switching the category to info or debug. Change-Id: Id6c36432da7e7ce673c585bcae6772a695028ec5
31 lines
578 B
C
31 lines
578 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <sys/types.h>
|
|
|
|
#include <osmocom/core/logging.h>
|
|
|
|
extern const struct log_info log_info;
|
|
|
|
/* Debug Areas of the code */
|
|
enum {
|
|
DMAIN,
|
|
DTRXCLK,
|
|
DTRXCTRL,
|
|
DTRXDDL,
|
|
DTRXDUL,
|
|
DDEV,
|
|
DDEVDRV,
|
|
DCTR,
|
|
};
|
|
|
|
pid_t my_gettid(void);
|
|
|
|
#define CLOGC(category, level, fmt, args...) do { \
|
|
LOGP(category, level, "[tid=%ld] " fmt, (long int) my_gettid(), ##args); \
|
|
} while(0)
|
|
|
|
#define CLOGCHAN(chan, category, level, fmt, args...) do { \
|
|
LOGP(category, level, "[tid=%ld][chan=%zu] " fmt, (long int) my_gettid(), chan, ##args); \
|
|
} while(0)
|