Skip to content

Is the unused gearman_log() function still needed? #477

Description

@p-alik

While reviewing `libgearman/log.cc` for #476, noticed that the bare `gearman_log()` function has no call sites anywhere in the repo:

  • Defined: `libgearman/log.cc:63`
  • Declared: `libgearman/log.hpp:62`

The rest of the file's logging entry points (`gearman_log_info`, `gearman_log_debug`, `gearman_log_error`) are all actively used by callers in `error.cc`, `universal.cc`, `add.cc`, `connection.cc`, and `worker.cc`, but `gearman_log()` itself is only referenced by its own definition/declaration and by doc-comments on the other two functions that point back to it for "argument details."

It's not part of the public `libgearman-1.0` API headers (no `gearman_client_set_log_fn`/`gearman_worker_set_log_fn`-style entry depends on it), so it looks like internal-only dead code — but it's possible it's kept intentionally for symmetry/future use, or used by out-of-tree consumers.

Question: should `gearman_log()` be removed, or is there a reason to keep it around?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions