Skip to main content

Convert log to json

Project description

log2json

Convert log file to text or json format.

Installation

This project can be installed via pip:

pip install log2json-fauzanelka

Or build it yourself by cloning this project:

git clone https://github.com/fauzanelka/log2json

Then install

cd log2json
python setup.py install

Usage

Convert to text format

Convert log file to text (default)

log2json /var/log/nginx/access.log -o $HOME/nginx-access.txt

Convert multiple log files to text with destination directory

log2json /var/log/nginx/access.log /var/log/nginx/error.log -d $HOME/log2json/

If destination directory is not provided, the scripts will use current directory + log2json_output

Convert to json format (not implemented yet)

Convert log file to json

log2json /var/log/nginx/access.log -t json -o $HOME/nginx-access.txt

Convert multiple log files to text with destination directory

log2json /var/log/nginx/access.log /var/log/nginx/error.log -t json -d $HOME/log2json/

For further documentation you can run

log2json -h

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

log2json-fauzanelka-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distributions

log2json_fauzanelka-0.0.1-py3.9.egg (6.8 kB view hashes)

Uploaded Source

log2json_fauzanelka-0.0.1-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page