Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
fatal usually appends the error string. Add 'fatalx' that doesn't.
Fix callers and move the prototypes to log.h
|
|
reported by Karl Jeacle, thanks!
|
|
gmid ended up printing two slashes between the hostname and the path
when logging the request IRI.
|
|
|
|
|
|
Due to capsicum(4), opening the log on-demand via syslog(3) fails.
openlog(LOG_NDELAY) forces the log to be opened immediately, before we
enter capsicum.
This doesn't affect OpenBSD (where pledge(2) doesn't stop syslog) nor
linux (where the log process is not sandboxed.)
Reported by Karl Jeacle, thank you!
|
|
|
|
|
|
|
|
Initialize the logger as soon as possible and log by default to
stderr. With this, some (common?) errors are printed early instead of
ending up in syslog.
# NB: this is in configless mode
% ./gmid -p 80
[2021-07-07 11:05:57] bind: Address already in use
% ./gmid -p 81
[2021-07-07 11:13:53] bind: Permission denied
%
|
|
|
|
leftover from the handle_imsg_log -> do_log transition.
|
|
the logger process now can receive a file descriptor to write logs
to. At the moment the logic is simple, if it receives a file it logs
there, otherwise it logs to syslog. This will allow to log on custom
log files.
|
|
With -f, when the main process exits after a fatal() (usually) the
shell prompt is printed before the logger message.
This adds a small poll to wait for the logger process to exit.
|
|
|
|
|
|
found by Anna, thanks!
|
|
|
|
while there, add capsicum for the logger process
|
|
use imsg to handle ALL kinds of IPC in gmid. This simplifies and shorten the
code, and makes everything more uniform too.
|
|
obviously msg[datalen] is an off-by-one
|
|
this is to let the regression suite compile
|
|
log.o is linked to some regress/ stuff. Calling from there a vhost_*
function means that we should link the regress/stuff to server.o too
(and that would pull in other stuff...). Moving the call is easier,
and also probably better.
|
|
|
|
|
|
|
|
|
|
Include gmid.h as first header in every file, as it then includes
config.h (that defines _GNU_SOURCE for instance).
Fix also a warning about unsigned vs signed const char pointers in
openssl.
|
|
|