Skip to content

Excessive Deprecation Warnings Flooding Logs #181

@luizamfsantos

Description

@luizamfsantos

Description
When using h3-pg, the function h3_cell_to_lat_lng triggers the following warning on every single call:

WARNING: Deprecation notice: h3_cell_to_lat_lng will be deprecated in favor of h3_cell_to_latlng in the next major release

This warning is emitted repeatedly, which makes the logs extremely noisy and difficult to work with. In environments where queries involving H3 cells are frequent, the volume of these warnings overwhelms other important log messages. This leads to:

  • Critical log messages being buried under deprecation spam.
  • Operational monitoring pain, as parsing/searching logs for real issues becomes tedious.
  • Developer friction, since normal debugging sessions are cluttered with thousands of repeated warnings.

Expected Behavior
Deprecation warnings should be:

  • Emitted once per session or once per function reference, not on every call.
  • Potentially configurable via a setting (e.g., suppress repeated warnings, opt-in verbose mode).
  • Logged at a less aggressive level (e.g., NOTICE or DEBUG) rather than spamming WARNING.

Why this matters
Logs are an essential tool for monitoring and debugging. If they are overwhelmed by repetitive deprecation messages, their usefulness drops significantly. While the deprecation itself is valid and useful information, the current behavior degrades operational visibility and makes it hard to detect actual issues.

Suggested Fix

  • Change implementation to warn once (per session or per process).
  • Or introduce a GUC/flag to control deprecation warning verbosity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions