Commits


kill unused variable leftover from the handle_imsg_log -> do_log transition.


allow sending fd to log on to the logger process 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.


wait for logger after fatal() 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.


fatal: send log to logger


send priority to the logger process


lower log priority for fatal errors from CRIT to ERR found by Anna, thanks!


print the datetime when logging to stderr


move all sandbox-related code to sandbox.c while there, add capsicum for the logger process


refactoring: imsg everywhere use imsg to handle ALL kinds of IPC in gmid. This simplifies and shorten the code, and makes everything more uniform too.


fix out-of-bounds access obviously msg[datalen] is an off-by-one


move log_init & vars to gmid.c, retain logger_main in log.c this is to let the regression suite compile


move vhost_should_log call to server.c 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.


add `log on/off' to enable/disable logs per-location


don't directly include sys/queue.h


tests and compat for imsg