[ofiwg] user control over log messages

Hefty, Sean sean.hefty at intel.com
Thu Apr 7 19:34:52 PDT 2022


The short version:

I'm proposing that we install include/rdma/providers as part of the libfabric installation.  Are there any issues with this?  These files are part of the stable API.

- Sean


The long version:
There have been 3 requests from different apps wanting control over libfabric log messages.  The following PR is the evolution of a proposal to make this happen:

https://github.com/ofiwg/libfabric/pull/7653

libfabric defines 3 APIs that control logging: fi_log_enabled, fi_log_ready, and fi_log.  Providers typically access these APIs through macros defined in fi_log.h.  The most flexible option is to allow apps to override all 3 of these calls with their own.  At least 1 app wants to override 2 of them, with some level of control over the implementation.

Installing the above headers makes this possible.

An alternative is to define simpler override calls and move select definitions into one of the installed headers (likely fabric.h).  For example, instead of the app implementing this override:

void (*external_log)(const struct fi_provider *prov, enum fi_log_level level,
	    enum fi_log_subsys subsys, const char *func, int line,
	    const char *fmt, ...)

it would implement this:

void (*external_log)(const char *buf);

In the case the app is only overriding the internal fprintf() call.  Libfabric would still perform the formatting.  This path appears sufficient for 1 of the apps.

- Sean (again)


More information about the ofiwg mailing list