For the complete documentation index, see llms.txt. This page is also available as Markdown.

Run Modes

The http_mode field controls the verbosity of request logging and the behaviour of the underlying Gin HTTP framework.

{
  "http_mode": "release"
}

Available modes

Mode
Gin framework mode
Request logging
Query statistics
Use case

debug

debug

Full Gin debug output including route registration

Printed after every request

Development and troubleshooting

test

test

Gin test mode output

Printed after every request

Automated integration tests

release

release

Standard Gin access log

Printed after every request

Production with logging

production

release

Suppressed entirely

Suppressed entirely

Production without logging overhead


Mode details

debug

Gin prints all registered routes at startup, plus a coloured access log line for every request. The proxy also logs per-request statistics showing the running total, cache hit/miss counts, and hit rate percentage. Use this when first setting up the proxy or diagnosing problems.

[GIN-debug] GET  /:ip_address  --> main.Maxmind_Query_IP (3 handlers)
[GIN] 2025/06/12 - 10:00:01 | 200 | 1.234ms | 10.0.0.1 | GET /8.8.8.8
[ Total Queries: 5 | Cached: 3 [60.0%] | Not Cached: 2 [40.0%] - 8.8.8.8 pull from cache.

release

The standard production mode. Gin does not print route registration or coloured debug output, but still logs each request. Query statistics are still printed to stdout after every lookup. Suitable for environments where a log aggregator (e.g. Loki, Splunk, CloudWatch) collects stdout.

test

Intended for use with automated test suites. Behaves like release for logging purposes.

production

All logging is suppressed — Gin's access log, query statistics, and error messages are all discarded. Use this when the proxy is running in a high-throughput environment and log volume is a concern, or when logs are genuinely not needed.

The proxy still starts and functions normally; errors are silently dropped rather than logged.


Choosing a mode

Scenario
Recommended mode

Local development

debug

CI / automated tests

test

Production with a log aggregator

release

High-throughput production, no logging needed

production

Last updated