Open LucasMW opened 4 months ago
It's not a dumb question. While it's documented, it's done a bit sparingly:
-f
(foreground) option, it will also print to logs to standard error (and won't put itself in the background)log access "/path/to/file"
can be used to log to a file (in addition to syslog and/or stderr)The log
documentation is here: https://gmid.omarpolo.com/gmid.conf.5.html#log
Thanks, I will give it a look. It's the first time I read about syslog, but now I have a keyword to search. The log option in conf might solve my problem as well. Thanks!
Let me clarify one point:
gmid by defaults logs to syslog, and where that actually ends up to depends on your configuration
with "your configuration" I really meant your syslog implementation and how it's configured. If you're using a systemd-based distribution, I believe it will end up in the journal. On OpenBSD, with the default configuration, the logs will end up in /var/log/messages
and /var/log/daemon
, but by changing /etc/syslog.conf
you can tell syslog to log gmid to some other file.
An example in the docs would be nice. It took me some trial and error to figure out, but:
user "_gmid"
chroot "/var/gemini"
dir = "/var/gemini"
certdir = "/usr/local/etc/letsencrypt/live"
log access "gmid.log"
server "example.com" {
...
This will log to /var/gemini/gmid.log
@agrajag9 yeah, an example would be nice. I added something in the "EXAMPLES" section of the manpage, could that have worked for you?
Yes, that's perfect! Thank you very much
Might be a dumb question, but I cannot find anywhere else.
Does gmid keeps a log of what happens and the requests it serves? Like what gemexp outputs to stdout Where is the default location for that? I can't find it.
Thanks in advance.