c-blosc2 icon indicating copy to clipboard operation
c-blosc2 copied to clipboard

Tracing macros

Open DimitriPapadopoulos opened this issue 1 month ago • 1 comments

Describe the bug

I am not sure I understand the tracing macros: https://github.com/Blosc/c-blosc2/blob/3ae32b6de27fb6ea383f9d6a54db7c81cdf25d39/include/blosc2.h#L114-L129

  • BLOSC_ERROR calls BLOSC_TRACE_ERROR, which prints only if environment variable BLOSC_TRACE is defined
  • BLOSC_INFO prints directly if environment variable BLOSC_INFO is defined. Instead, I think it should call BLOSC_TRACE_INFO, which prints only if environment variable BLOSC_TRACE is defined.

I realise that it's probably unfeasible to modify things without slightly breaking backwards compatibility, but the current macros don't make sense to me: if environment only variable BLOSC_INFO is defined, BLOSC_INFO will print but BLOSC_ERROR will not print!

DimitriPapadopoulos avatar Jun 11 '24 09:06 DimitriPapadopoulos