From e58a447a28a416ee719a9e457bfc8160a9b0e771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20=E2=80=9CCyberTailor=E2=80=9D?= Date: Thu, 29 Jul 2021 09:13:43 +0500 Subject: [PATCH] gmid.1: document logging --- README.md | 2 +- gmid.1 | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b06cd7..6a3ac38 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ gmid is composed by four processes: the parent process, the logger, the listener and the executor. The parent process is the only one that doesn't drop privileges, but all it does is to wait for a SIGHUP to reload the configuration and spawn a new generation of children -process. The logger processes gather the logs and prints 'em to +process. The logger process gathers the logs and prints 'em to stderr or syslog (for the time being.) The listener process is the only one that needs internet access and is sandboxed by default. The executor process exists only to fork and execute CGI scripts, and diff --git a/gmid.1 b/gmid.1 index 71bf292..726b0cb 100644 --- a/gmid.1 +++ b/gmid.1 @@ -11,7 +11,7 @@ .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.Dd $Mdocdate: January 30 2021$ +.Dd $Mdocdate: July 29 2021$ .Dt GMID 1 .Os .Sh NAME @@ -598,6 +598,33 @@ text/plain .It xml text/xml .El +.Sh LOGGING +Messages and requests are logged by +.Xr syslog 3 +using the +.Dv DAEMON +facility or printed on +.Em stderr . +.Pp +Requests are logged with the +.Dv NOTICE +severity. +Each request log entry has the following fields, separated by +whitespace: +.Pp +.Bl -bullet -compact +.It +Client IP address and the source port number, separated by a colon +.It +.Sy GET +keyword +.It +Request URL +.It +Response status +.It +Response meta +.El .Sh EXAMPLES Serve the current directory .Bd -literal -offset indent