Logs

The agent logs what its terminal view shows — endpoints coming online and going offline, every request and TCP or TLS connection — plus its connection to the tunnel server, heartbeats and updates. The flags are ngrok’s:

$ devgate http 8080 --log stdout --log-format logfmt

Flags

FlagValues
--logstdout or stderr — instead of the terminal view; a file path — appended to, alongside the view; false — nowhere.
--log-formatterm (default) for people, logfmt or json for log collectors.
--log-leveldebug, info (default), warn or error.

Without a terminal — a service, a pipe, a container — the agent logs to stdout unless --log says otherwise. In a terminal it logs nowhere by default, and shows its live view.

In the config file

The same keys go under agent:, as in ngrok’s config; a flag wins over the file.

~/.devgate/devgate.yml
version: 3
agent:
  authtoken: <your-authtoken>
  log: /var/log/devgate.log
  log_format: logfmt
  log_level: info

This is how devgate service picks a log file and format.

Records

Each record is a message and its fields. A request, in each format:

term · logfmt · json
2026-10-29 12:00:00 INFO  request name=web method=GET path=/api/users status=200 dur=3.2ms bytes=1840
t=2026-10-29T12:00:00Z lvl=info msg=request name=web method=GET path=/api/users status=200 dur=3.2ms bytes=1840
{"t":"2026-10-29T12:00:00Z","lvl":"info","msg":"request","name":"web","method":"GET","path":"/api/users","status":200,"dur":3.2,"bytes":1840}

In JSON, dur is in milliseconds. Other messages: tunnel online, tunnel offline, connection (TCP and TLS), connected to the tunnel server, heartbeat failed, retrying, update available; debug adds every heartbeat and session.

Questions people actually ask

How do I get devgate’s logs as JSON?

devgate http 8080 --log stdout --log-format json prints one JSON object per line instead of the terminal view: t, lvl, msg and the record’s fields. In the config file the same is log: stdout and log_format: json under agent:.

Where does the devgate service log?

Wherever agent: log in its config file says. Without it, journalctl -u devgate on Linux, ~/Library/Logs/devgate.log on macOS, and devgate.log next to the config file on Windows.