1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-09-22 04:35:56 -04:00
gophernicus/src
Augustin Fabre 9c0b6a66a4
Rework logging logic
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
2020-10-12 20:21:06 +02:00
..
bin2c.c Spaces to Tabs as per consensus in #56 2020-02-05 19:19:42 +11:00
file.c Rework logging logic 2020-10-12 20:21:06 +02:00
filetypes.conf Filetypes2 (#57) 2020-01-20 22:36:02 +00:00
filetypes.sh Filetypes2 (#57) 2020-01-20 22:36:02 +00:00
gophernicus.c Rework logging logic 2020-10-12 20:21:06 +02:00
gophernicus.h Rework logging logic 2020-10-12 20:21:06 +02:00
log.c Rework logging logic 2020-10-12 20:21:06 +02:00
menu.c Rework logging logic 2020-10-12 20:21:06 +02:00
options.c Declare function prototypes explicitly 2020-06-08 13:10:06 +10:00
platform.c Rework logging logic 2020-10-12 20:21:06 +02:00
session.c Rework logging logic 2020-10-12 20:21:06 +02:00
string.c Remove trailing whitespace 2020-04-23 21:18:23 +02:00