Skip to content

Log level changes are not visible in lower level libraries #641

Description

@bioothod

When elliptics log level is changed (for example via dnet_ioclient -r addr:port:family -M debug), it only affects elliptics logger.

And while eblob (lower level library) uses the same blackhole logger, it has internal log-level field, which is never updated after eblob initialization. Eblob's log-level field is being set in dnet_blob_config_init() only. Eblob checks whether current log level allows new message to be printed, and while blackhole would print new message (its log level has changed), it is not called, since eblob's own log level hasn't changed.

There are 2 ways to fix this:

  1. update eblob and never check its internal log-level, it will only exist in ABI as unused field, and all log-level related checks will happen in blackhole logger
  2. propagate log-level changes into eblob internal logger's field, when elliptics' log-level is being changed. This is noticeably simpler solution, although not aesthetically pure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions