Skip to content

0.5.0: route logging through Gravity Forms' logging framework#4

Merged
oxyc merged 1 commit into
mainfrom
feat/gf-logging
Jun 3, 2026
Merged

0.5.0: route logging through Gravity Forms' logging framework#4
oxyc merged 1 commit into
mainfrom
feat/gf-logging

Conversation

@oxyc
Copy link
Copy Markdown
Member

@oxyc oxyc commented Jun 3, 2026

Summary

Follow-up to the 0.4.0 logging: instead of a custom "Debug logging" toggle + raw error_log, decisions now log through Gravity Forms' own logging framework (the GF convention).

Because the plugin already extends GFAddOn, it now appears under Forms → Settings → Logging as ALTCHA for Gravity Forms, with a per-add-on level (off / errors only / all) and a downloadable log file. Failures (fail / blocked / spam) log at error level, passes at debug — so "Log errors only" surfaces just the blocks.

altcha: fail {"form":43,"reason":"replay"}
rate_limit: blocked {"form":12}
content_filter: spam {"form":7,"score":3,"signals":["keyword"]}
email_validation: blocked {"form":7,"status":"undeliverable","domain":"example.com"}
  • Drops the enable_logging setting, loggingEnabled(), the writeToErrorLog sink, and the genero/gravityforms_altcha/logging filter — GF's Logging UI controls verbosity now.
  • Keeps the genero/gravityforms_altcha/log action for custom routing (Sentry, Query Monitor).
  • Privacy unchanged: IPs as a salted hash, emails as domain only.

Verified on DDEV

  • GF Logging add-on active; the add-on shows up in the Logging list as "ALTCHA for Gravity Forms"; the bridge runs and emits records. 56 unit+mocked tests green (PHP 8.2–8.4).

Bumps to 0.5.0.

🤖 Generated with Claude Code

…mework

Instead of a custom "Debug logging" toggle + raw error_log, decisions now log
via GFAddOn::log_error/log_debug, so the add-on appears under Forms → Settings →
Logging with a per-add-on level (off / errors only / all) and a downloadable log
file — the standard GF convention. Failures log at error level, passes at debug.

The genero/gravityforms_altcha/log action remains for custom routing (Sentry,
…). Drops the enable_logging setting, loggingEnabled(), the writeToErrorLog sink
and the logging filter. Privacy unchanged (hashed IP, email domain only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oxyc oxyc merged commit 74b4cb7 into main Jun 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant