flux-framework / dyad

DYAD: DYnamic and Asynchronous Data Streamliner
GNU Lesser General Public License v3.0
7 stars 5 forks source link

logger is broken for utils #90

Open JaeseungYeom opened 8 months ago

JaeseungYeom commented 8 months ago

I am build it with -DDYAD_LOGGER=FLUX. The compilation error is coming from the attempt to de-reference a NULL pointer.

DYAD_LOG_DEBUG (NULL, "DYAD UTIL: buffer is too small.\n");
      |         ^~~~~~~~~~~~~~
/src/dyad/common/dyad_logging.h:36:57: error: request for member ‘h’ in something not a structure or union
   36 | #define DYAD_LOG_DEBUG(dyad_ctx, ...) flux_log (dyad_ctx->h, LOG_DEBUG, __VA_ARGS__);

Another issue which is separate is the default logger did not record anything when dyad crashed.

JaeseungYeom commented 8 months ago

PR #91

JaeseungYeom commented 8 months ago

In addition, there are different logging that are not part of the main logger framework, DPRINTF and IPRINTF. It is because these are relying on ctx->debug for dynamic control via environment variable. There is a similar logging in DTL as well, These all should be merged into the main logger framework. Also, the debug variable checking should be part of macro such that that conditional does not exist if the logging level is disabled.