You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted in #321, it would make sense for flux_log() to log to stderr if the flux_t argument is NULL.
One use case (unit testability of otherwise standalone code with flux_log() calls in it) is mentioned in #1190
We could simply log to stderr if the arg is NULL. For extra credit, turn level into a string and log that too. I think it's debatable whether we'd want to go further than that, e.g. add timestamp, use globals to store the "log context" (thereby allowing flux_log_set_appnum() and flux_log_set_procid() to work), etc.
The text was updated successfully, but these errors were encountered:
chu11
added a commit
to chu11/flux-core
that referenced
this issue
Sep 14, 2017
Make flux handle optional in logging functions. If flux handle
is NULL, output to stderr.
Update documentation and add unit tests appropriately.
Fixesflux-framework#1191
As noted in #321, it would make sense for
flux_log()
to log to stderr if theflux_t
argument is NULL.One use case (unit testability of otherwise standalone code with
flux_log()
calls in it) is mentioned in #1190We could simply log to stderr if the arg is NULL. For extra credit, turn
level
into a string and log that too. I think it's debatable whether we'd want to go further than that, e.g. add timestamp, use globals to store the "log context" (thereby allowingflux_log_set_appnum()
andflux_log_set_procid()
to work), etc.The text was updated successfully, but these errors were encountered: