Translate a CiviProxy logfile into JSON format.
Go to file
Marc Koch 0a601d4e9f
🔖 bump version 1.0.8 -> 1.1.0
2024-07-09 14:43:41 +02:00
.idea 🐛 fix missing import of constants 2022-10-30 00:36:52 +02:00
src/civiproxy_logs2json 🔖 bump version 1.0.8 -> 1.1.0 2024-07-09 14:43:41 +02:00
tests 🐛 fix import in test 2022-10-30 00:41:31 +02:00
.gitignore 🙈 include whole .idea directory in gitignore 2024-07-09 14:42:39 +02:00
LICENSE 🎉 Initial commit 2022-10-27 20:56:50 +02:00
MANIFEST.in 📦️ use pyproject.toml to build the package 2022-10-29 22:59:58 +02:00
README.md ️ use generator to parse JSON lines 2024-07-09 14:42:14 +02:00
pyproject.toml 🔖 bump version 1.0.8 -> 1.1.0 2024-07-09 14:43:41 +02:00
setup.py 📦️ use pyproject.toml to build the package 2022-10-29 22:59:58 +02:00

README.md

CiviProxy_Logs2Json

Translate a CiviProxy logfile into JSON format.

Installation

python3 -m pip install civiproxy_logs2json --user

Example Usage

Pass logfile as option:

cpl2j -f /var/www/proxy_logs/proxy.log

Pipe logfile into program:

cat proxy.log | cpl2j 

Set JSON indentation to two spaces:

cat proxy.log | cpl2j -s 2 

Output JSON lines:

cpl2j -l -f /var/www/proxy_logs/proxy.log

Tip

Use VisiData to explore the data in a very comfortable way: /var/www/proxy_logs/proxy.log

cpl2j -l -f /var/www/proxy_logs/proxy.log | vd -f jsonl