Skip to main content

LogTool is used to extract all Unique Errors messages from log files that took place in the past.

General

As the user, you can provide the "since time" and debug level to be used for extraction of Errors/Warnings. For example, if something went wrong in the past, you're be able to extract Error/Warnings messages for just that time period. Let's say that you have all relevant log files located in: /var/log/containers and that the problem you are trying to debug, happened after: 2020-08-25 12:00:00
If so, you'll need to set the following values in ".ini" configuration file and to provide:

time_grep=2020-08-25 12:00:00
log_root_dir=['var/log/containers']
string_for_grep = ERROR

Installation

pip3 install zahlabut

Configuration file

Prior to starting analyze process, you'll need to create and load the configuration file. Configuration file could be any *.ini file and you can find the example/template on GitHub:
https://github.com/zahlabut/LogToolPyPi/blob/master/conf.ini
Note: change the configuration according to your needs.

Usage - Python code example

#!/usr/bin/python3    
from zahlabut.LogTool import *               # To import all from zahlabut LogTool package
load_conf_file('conf.ini')                   # To load the cofiguration file (conf.ini).
result=start_analyzing()                     # Start analyzing log files.
print(result['Standard_Log_Results'][0])     # First item in result list (raw data) for Standard logs.
print(result['Not_Standard_Log_Results'][0]) # First item in result list (raw data) for Not Standard logs. 

Generated result files

LogTool result files will be generated according to the settings provided in "conf.ini" file.

create_logtool_result_file=yes
log_tool_result_file = ResultFile.log
save_standard_logs_raw_data_file='Standard_Logs_Output.log'
save_not_standard_logs_raw_data_file='Not_Standard_Logs_Output.log'

Once "log_tool_result_file = ResultFile.log" is generated you'll be able to find all the statistics + exported unique Error blocks in this file. Created file is generated with some simple logic (its content is divided into the sections) see the description on the top of created result file.

Metadata

Release files for zahlabut 0.0.2.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zahlabut 0.0.2.18
File Size Uploaded Provenance Actions
zahlabut-0.0.2.18.tar.gz 14.9 kB Without provenance Details for zahlabut-0.0.2.18.tar.gz

Release files / zahlabut-0.0.2.18.tar.gz

Download URL zahlabut-0.0.2.18.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3fb6343f76f0e9aa94f63aaac04104b6881150529bdc6e3e693e1d77003ce707
BLAKE2b-256 checksum
How to use checksums
22b8f47e4ccfaa5b5ba01cd0f38b7d444fd3605f177df5ea62bf773da918b008
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8

Security for zahlabut 0.0.2.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page