mirror of
https://github.com/gophernicus/gophernicus.git
synced 2025-02-02 15:08:00 -05:00
This commit fixes issue #42 [0]. Debug level messages are masked unless option `-d' (debug) is used. In this case, all messages are also printed to stderr. syslog.h is included in the base POSIX only since issue 6 (POSIX:2001) [1]. `LOG_UPTO' is an extension, not defined by POSIX; an implementation is provided here for platforms where it is missing. This code is inspired by OpenBSD's httpd(8) logging functions [2]. [0] https://github.com/gophernicus/gophernicus/issues/42 [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/setlogmask.html [2] https://cvsweb.openbsd.org/src/usr.sbin/httpd/log.c?rev=1.14&content-type=text/x-cvsweb-markup