Oninit® 4gl2everywhere — SQL Trace
Per-session SQL trace files record the token stream the bridge processed for each connection. Trace is independent of the main log: trace files capture per-statement detail useful for forensics and dialect debugging, while the log is the operator-facing stream.
File layout
SQL trace files land under a configurable directory (default /var/log/4gl2everywhere/sql). The filename_pattern config field controls the per-session filename, with three tokens: %p for process pid, %t for session-start unix timestamp, %s for session id. The default pattern session_%p_%t_%s.sql produces files like session_4127_1715021400_3.sql — sortable, stable, and per-session.
Trace contents
Each request emits a one-line summary — token name and byte count, e.g. SQ_PREPARE [128 bytes]. The captured SQL text, when present in the request, follows tagged with the session id. The format is intentionally line-oriented to support real-time tail and grep workflows.
Per-listener overrides
The trace block can be set globally and overridden per listener. Each listener inherits the global block field-by-field, so a listener can silence trace (enabled: false) or send to a different directory without re-stating the unchanged fields. Overrides reload on SIGHUP without dropping sessions.