inconshreveable / ngrok

Unified ingress for developers

Home Page:https://ngrok.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems with logging

chupocro opened this issue · comments

When logging is configured as:

log_level: debug
log_format: logfmt
log: /var/log/ngrok.log

There is the error:

./ngrok start --all

ERROR:  Failed to configure logging: Failed to open log file '/var/log/ngrok.log': open /var/log/ngrok.log: permission denied
ERROR:

sudo ./ngrok start --all does not start ngrok, it just lists the help.

When logging is configured as:

log_level: debug
log_format: logfmt
log: ~/ngrok.log

the error is:

./ngrok start --all

ERROR:  Failed to configure logging: Failed to open log file '~/ngrok.log': open ~/ngrok.log: no such file or directory
ERROR:

This works:

log_level: debug
log_format: logfmt
log: /home/username/ngrok.log

Why the other options don't work and why ngrok can't be started with sudo?