Deline is a command-line utility designed to filter out unwanted log entries from files, specifically targeting false positives commonly generated by log scanning tools like SecretFinder. This tool allows users to specify a string; any line containing this string will be omitted from the output, aiding in clearer, more relevant data analysis.
- Filtering Logs: Remove lines that contain specified strings to clean up log files.
- Customization: Fully customizable through command-line arguments to target specific strings.
- Simplicity: Easy-to-use command-line interface.
- Python 3.x
Download the script directly or clone the repository:
git clone https://github.com/heis3nberg-lab/Deline.gitHere is how you can use Deline to filter your logs:
python deline.py --string 'target_string' --input input_file.txt --output output_file.txtTo see a full list of available options:
python deline.py --help-str,--string: The string to search for within the log file. Lines containing this string will be removed from the output.-i,--input: Path to the input file which contains the log data.-o,--output: Path to the output file where the cleaned data will be written.
To filter out lines containing "ERROR" from system.log and save the result to clean_system.log:
python deline.py --string 'ERROR' --input system.log --output clean_system.logContributions are welcome! Please fork the repository and submit a pull request with your improvements.
For support or queries, reach out via GitHub Issues or your preferred method of contact.