Metadata-Version: 2.1
Name: mplogp
Version: 0.1.0
Summary: A log parser for parsing logs generated from multi-processing based tools.
Home-page: https://github.com/soda480/mplogp
Author: Emilio Reyes
Author-email: soda480@gmail.com
Maintainer: 
Maintainer-email: 
License: Apache License, Version 2.0
Description: # mplogp
        [![build](https://github.com/soda480/mplogp/actions/workflows/main.yml/badge.svg)](https://github.com/soda480/mplogp/actions/workflows/main.yml)
        [![codecov](https://codecov.io/gh/soda480/mplogp/branch/main/graph/badge.svg?token=GA62T7LDGK)](https://codecov.io/gh/soda480/mplogp)
        [![Code Grade](https://www.code-inspector.com/project/22249/status/svg)](https://frontend.code-inspector.com/project/22249/dashboard)
        [![complexity](https://img.shields.io/badge/complexity-Simple:%204-green)](https://radon.readthedocs.io/en/latest/api.html#module-radon.complexity)
        [![vulnerabilities](https://img.shields.io/badge/vulnerabilities-None-green)](https://pypi.org/project/bandit/)
        [![python](https://img.shields.io/badge/python-3.9-teal)](https://www.python.org/downloads/)
        
        A log parser for parsing logfile generated from multi-processing based tools. Supports log files generated with Formatter whose first two fields are: `%(asctime)s %(processName)s ...`.
        
        
        ## `mplogp`
        ```
        usage: mplogp [-h] --log LOG --folder FOLDER [--regex REGEX]
        
        A log parser for parsing logs generated from multi-processing based tools
        
        optional arguments:
          -h, --help       show this help message and exit
          --log LOG        The location of the logfile to parse
          --folder FOLDER  The folder where to write the parsed logs
          --regex REGEX    Regular expression to alias process log filename - must contain a matched group
        ```
        
        ### Examples
        Parse the `example3.log` file and write output to the `logs` folder and alias each process log with their respective processor id:
        ```
        mplogp --log example3.log --folder logs --regex ".*processor id (.*)$"
        ```
        The log file contained logs from 10 processes and produced the following logs:
        ```
        logs
        └── 2021-05-13_18-48-46
            ├── MainProcess.log
            ├── Process-1-69b41899.log
            ├── Process-10-c40f3916.log
            ├── Process-2-a6ffc5b5.log
            ├── Process-3-14175157.log
            ├── Process-4-90e875c2.log
            ├── Process-5-ef35f44f.log
            ├── Process-6-c7268544.log
            ├── Process-7-7557d6d6.log
            ├── Process-8-e248e861.log
            └── Process-9-0bb23bab.log
        ```
        
        ## Development
        
        Build the Docker image:
        ```bash
        docker image build \
        -t prepbadge:latest .
        ```
        
        Run the Docker container:
        ```bash
        docker container run \
        --rm \
        -it \
        -v $PWD:/mplogp \
        prepbadge:latest /bin/sh
        ```
        
        Build the project:
        ```bash
        pyb -X
        ```
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: Other Environment
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Systems Administration
Description-Content-Type: text/markdown
