Repository navigation
NethVoice: reduce log verbosity #8173
Description
NethVoice logs are too verbose during normal operation.
Most of the lines are generated by Janus which is configured in info level.
Then, FreePBX, NethCTI middleware, NethCTI server, Satellite and Tancredi (in debug mode).
Also Kamailio produced a very large of useless log, it will be handled in a different issue.
The purpose is to keep the journal small, make real errors visible, and still allow raising the verbosity if needed.
Proposed solution
Lower the default log level of the components that currently run at their loudest setting, and expose each level as a module environment variable.
| Component | Current default | Proposed default | Variable |
|---|---|---|---|
| Janus | 5 | 3, warnings and errors | JANUS_DEBUG_LEVEL |
| Tancredi | DEBUG |
WARNING |
TANCREDI_LOG_LEVEL (new) |
| NethCTI middleware | debug mode | release mode | NETHVOICE_MIDDLEWARE_GIN_MODE (new) |
| Reports API | release mode | release mode | REPORTS_GIN_MODE (explicit) |
| FreePBX: supervisord, cron, PAM | every job start, end and session | failures only | FREEPBX_LOG_LEVEL (new) |
| Satellite | INFO, the image default |
WARNING |
SATELLITE_LOG_LEVEL (new) |
On existing installations JANUS_DEBUG_LEVEL is lowered only when it still holds the old default of 5.
Satellite at INFO logged every RTP stream, every ARI channel event and every HTTP request, and uvicorn added its own access lines. The value also sets uvicorn's level.
For FreePBX the cron and PAM lines are few. The image replaces FreePBX's cron manager with a noop and ships no asterisk crontab: the spool is empty and /etc/crontab carries only the four stock run-parts entries, which run as root and at most hourly. FREEPBX_LOG_LEVEL is still worth having, but it removes little volume.
Most of what the FreePBX container writes comes out at container start: on an idle system a restart produces about 550 journal lines, largely fwconsole progress bars and blank lines, and then it stays silent. That is a separate problem and is not addressed here.
Please note that NethCTI middleware was running in debug mode with CORS checks disabled.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]NethVoice: reduce log verbosity of Janus, Tancredi, FreePBX and the API services[/-][+]NethVoice: reduce log verbosity[/+]gsanchietti commentedon Sep 18, 2026
Testing versions:
ns8-nethvoice:reduce_log_level,ns8-nethvoice-proxy:1.7.3-testing.6Fresh install:
Update an existing instance:
Read the logs of the instance with:
Test case 1: Janus, clean install
januslog inside journald[janus]Test case 2: FreePBX, clean install
freepbxlog inside journaldTest case 3: Tancredi, clean install
tancredilog inside journaldTest case 4: CTI middleware, clean install
nethcti-middlewarelog inside journaldTest case 5: Reports, clean install
reports-apilog inside journaldTest case 6: Satellite, clean install
satellitelog inside journaldTest case 7: update from a previous version
Test case 8: raise every level back to debug
runagent -m nethvoice1 vi environmentsystemctl restart user@nethvoice1(from root user)3,WARNING,warn,WARNING,release,release, restart again, and check the lines disappear againTest case 9: proxy, clean install
kamailiolog inside journaldTest case 10: proxy, security events still logged
[SECURITY-AUTHFAIL]line must appear for that phonesipsak -s sip:test@<proxy address>: these lines must appearTest case 11: proxy, update from a previous version
Test case 12: proxy, raise the log level
runagent -m nethvoice-proxy1 podman exec kamailio kamcmd corex.debug 3, then register a phone: many more lines must appear in the logrunagent -m nethvoice-proxy1 podman exec kamailio kamcmd corex.debug 0: the extra lines must stoprunagent -m nethvoice-proxy1 vi environmentand setKAMAILIO_LOG_LEVEL=3systemctl restart user@nethvoice-proxy1(from root user), register a phone and check the extra lines are thereKAMAILIO_LOG_LEVEL=0, restart, and check the extra lines disappearchore(timers): silence periodic unit logs
6 remaining items
edospadoni commentedon Oct 7, 2026
Tested on a two-node NS8 cluster.
ghcr.io/nethesis/nethvoice:reduce_log_levelandghcr.io/nethesis/nethvoice-proxy:1.7.3-testing.61.7.9+ proxy1.7.2updated to the versions under test.[janus]; only the startup banner is left besides warnings.reaped unknown pid, 88 supervisord INFO and 48 CRON/pam lines. After the change: 0. Asterisk lines are still logged.provisioning.DEBUG/upgrade.DEBUGlines, no secrets or request bodies in the log.[GIN]lines. Login works and calls show up in the history.WARNING, transcription works.JANUS_DEBUG_LEVEL5 → 3, new defaults added). Users, extensions, trunks and phones unchanged.tcp_read_req,parse_first_lineorMalformed SIPlines.SECURITY-AUTHFAILfor correctly registered phones over 1h. A wrong password logsSECURITY-AUTHFAIL; asipsakUA logsSECURITY-SCANNER+R-BLOCKIP. CrowdSec ban not tested.kamcmd corex.debugtoggles the output at runtime.KAMAILIO_LOG_LEVEL=3survives a restart and a save from the settings page, and0silences it again.TC5: reports-api still logs every request
With
GIN_MODE=release(confirmed inside the container) reports-api still prints a line for every request:nethvoice-reportbuilds its router withgin.Default()(api/main.go).gin.Default()always adds the request logger, whatever the mode.GIN_MODE=releaseonly removes the[GIN-debug]route dump and disables the permissive CORS. The output is the same as on 1.7.9.We need to decide whether:
nethvoice-report: usegin.New()withgin.Recovery(), and addgin.Logger()only whenGIN_MODE=debug. This matches what the middleware already does.Amygos commentedon Oct 12, 2026
Release
nethesis/ns8-nethvoice1.7.10Amygos commentedon Oct 12, 2026
Release
nethesis/ns8-nethvoice-proxy1.7.3