Fix regression for tracing asn1c enc/dec tracing

As described in common/utils/config.h, it is possible to hook into the
asn1c tracing mechanism to print logs.

This commit fixes a regression to print theses traces properly in OAI.
Above-mentioned file explains also how to reduce the amount of logs,
e.g., for single code blocks.
This commit is contained in:
Robert Schmidt
2023-08-01 14:44:32 +02:00
parent f099ff59eb
commit 31f9dff938
3 changed files with 18 additions and 12 deletions
+7 -4
View File
@@ -22,12 +22,15 @@
#ifndef UTILS_CONFIG_H_ASN1
#define UTILS_CONFIG_H_ASN1
// This is hard coded file name "config.h" and HAVE_CONFIG_H_ in asn1c skeletons
// This is hard coded file name "config.h" in asn1c skeletons
/*
* This file "config.h" will be used by asn1c if HAVE_CONFIG_H_ is defined and
* included. This logs asn1c encoder and decoder traces at execution time using
* the regular OAI logging system, i.e., LOG_I(ASN1...);
* included (this is the case for OAI).
* This allows to trace the asn1c encoder and decoder at execution time using
* the regular OAI logging system, i.e., LOG_I(ASN1, ...);
*
* to enable it, at compilation time, see ./build_oai --enable-asn1c-debug
*
* As it is very verbose, note that you can change the log level per module in
* source or in gdb, e.g., to only activate it for a short time.
@@ -47,7 +50,7 @@
*/
#include "common/utils/LOG/log.h"
#if DEBUG_ASN1C
#if TRACE_ASN1C_ENC_DEC
#define ASN_DEBUG(x...) do{ LOG_I(ASN1,x);LOG_I(ASN1,"\n"); } while(false)
#else
#define ASN_DEBUG(x...)