Add missing identity position for Common and Combined formats

This commit is contained in:
Forza 2024-10-08 20:50:37 +02:00
parent ae760f4abd
commit 40dc4c2e3c

View File

@ -3,7 +3,7 @@
# shellcheck shell=bash
# Caddy webserver JSON log parser
# version 0.1.0
# version 0.1.1
#
# This script reads a Caddy logfile in JSON format and
# outputs it in Apache Common Log Format.
@ -271,6 +271,7 @@ case "$format" in
# Common Log format
log_format \
client_ip \
space hyphen \
space user_id \
space lsqb datetime rsqb \
space quote method \
@ -283,6 +284,7 @@ case "$format" in
# 'q' can be used instead of 'quote'
log_format \
client_ip \
_ hyphen \
_ user_id \
_ lsqb datetime rsqb \
_ q method _ uri _ proto q \
@ -327,7 +329,7 @@ esac
#
# Where:
# %h is the remote host (client IP)
# %l is the remote logname (not used, so we'll use -)
# %l is the remote identity (not used, so we'll use -)
# %u is the authenticated user
# %t is the time the request was received
# %r is the request line from the client ("method uri proto")