/logxstract

Library for extracting xml from logs to output file.

Primary LanguagePythonMIT LicenseMIT

logxstract

Library for extracting xml from logs. Finds xml matching criteria and saves results to file.

Install

$ pip install logxstract

Example xml in log which could be extracted

Example

Usage as library

        from logxstract import extract_xml_from_file

        extract_xml_from_file(
            path='/item',
            body='/item',
            input_file='sample.log',
            output_file='result.txt'
        )
        #extracted xml is now in result.txt file

Usage in shell

$ logxtract -p /item -b /item -f sample.log -o result.txt