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
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
Built Distribution
Close
Hashes for log2json-fauzanelka-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d99f1fddb1c0323ebd0ca342c066e5c90e701ce74c6ada7e274d6bad767bc248 |
|
MD5 | 0ee599da84d94ef95faeaa195ec89e7d |
|
BLAKE2b-256 | af409707b5f7824ff9f6c5b3ea9ae654f35bb0ee42bc192d34903e020aa1ca5f |
Close
Hashes for log2json_fauzanelka-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e715993614def84f98c3caee188e6a6c17b89eb84d24a81b7bcb01d9bf0a4475 |
|
MD5 | bdb8687d5742f0b17a0209632e72f116 |
|
BLAKE2b-256 | 41dd43e8c619acaa21c208be8f6edcf6c03f04af363e8b7af06ac0d17e2b23a2 |