{"push_id":2624398093,"size":1,"distinct_size":1,"ref":"refs/heads/fix/systemd","head":"7e5e03258387ed49943f715793cb8b5aaca21002","before":"d7b819e4d1cefe7bd03d613c2cc94182eaca93bc","commits":[{"sha":"7e5e03258387ed49943f715793cb8b5aaca21002","author":{"name":"Alan Jenkins","email":"80a2edbb6a10db4ca229372563196b5c5e6cb878@gmail.com"},"message":"Fix logging under systemd\n\nicinga2.service used `-e ${ICINGA2_ERROR_LOG}`, but this is documented\nas having no effect without `-d`.  Additionally, icinga2 under systemd\nunconditionally logged everything to the system log (but without setting\nthe log level etc), which contradicted the documentation.  (Issue #6339)\n\nThis commit stops icinga2 on systemd from logging to stdout - and hence the\nsystem log - once it has finished starting up.  Just like when you start\nicinga2 from a terminal using `-d`.  Just like -d, we also stop logging\nfatal errors to stderr, and instead write to the log file passed with `-e`.\n\nAs per docs, mainlog (icinga2.log) is already enabled by default.  That\nsaid, this is a *breaking change*, for anyone who is used to\npost-startup messages from icinga2.service appearing in the system log\nwithout them explicitly enabling any feature.  (Note, if they *had* tried\nto enable the syslog feature, I think this would have caused duplicate\nmessages.  So I think they would have left the syslog feature disabled).\n\nThis uses a new option --close-stdio, which has the same effect on logging as\n--daemonize, but does not fork or call setsid().\n\nFor this purpose, I moved setsid() up and into Daemonize().\n\nConsequence of that last point: if anyone is weird enough to specify a TTY\ndevice file as the fatal error log (-e option), that will become icinga's\ncontrolling terminal, which you generally don't want as a daemon.  This\nmakes it consistent with the existing behaviour for icinga mainlog.  For\nthis reason you're supposed to use O_NOCTTY in Linux daemons.  But I wasn't\nsure where icinga would want to put the ugly `#ifdef _WIN32 ... #else ...`.","distinct":true,"url":"https://api.github.com/repos/sourcejedi/icinga2/commits/7e5e03258387ed49943f715793cb8b5aaca21002"}]}
{"actor":{"display_login":"sourcejedi"}}