Features: - JSON logging of HTTP requests to Unix domain socket - Configurable HTTP headers logging (flat JSON structure) - Header value truncation and count limits - Automatic reconnect on socket disconnection - Error reporting with throttling Configuration directives: - JsonSockLogEnabled: Enable/disable logging - JsonSockLogSocket: Unix socket path - JsonSockLogHeaders: List of headers to log - JsonSockLogMaxHeaders: Maximum headers to log - JsonSockLogMaxHeaderValueLen: Max header value length - JsonSockLogReconnectInterval: Reconnect delay - JsonSockLogErrorReportInterval: Error log throttle Includes: - Module source code (src/) - Unit and integration tests (tests/, scripts/) - Documentation (README.md, architecture.yml) - Build configuration (CMakeLists.txt, Makefile) - Packaging (deb/rpm) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
32 lines
764 B
Bash
Executable File
32 lines
764 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# test.sh - Run tests for mod_reqin_log in Docker
|
|
#
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
IMAGE_NAME="mod_reqin_log-build"
|
|
|
|
echo "========================================"
|
|
echo "mod_reqin_log - Test Suite"
|
|
echo "========================================"
|
|
echo ""
|
|
|
|
# Build image if not exists
|
|
if ! docker images "$IMAGE_NAME" | grep -q "$IMAGE_NAME"; then
|
|
echo "Building Docker image first..."
|
|
"$SCRIPT_DIR/scripts/build.sh"
|
|
fi
|
|
|
|
echo "Running unit tests..."
|
|
echo ""
|
|
|
|
# Run unit tests in container
|
|
docker run --rm "$IMAGE_NAME" bash -c "cd build/tests && ctest --output-on-failure"
|
|
|
|
echo ""
|
|
echo "========================================"
|
|
echo "Unit tests completed"
|
|
echo "========================================"
|