clear_color_log v1.1.1
Log Color Cleaner ๐งน๐จ
Log Color Cleaner is a powerful CLI tool designed to remove ANSI color codes from log files, making them easier to read and process.
๐ Features
- ๐๏ธ Process single log files or entire directories
- ๐ Recursive directory scanning
- ๐ Removes all ANSI color codes
- ๐ Preserves original file structure
- ๐ Supports multiple languages (currently English and Korean)
- ๐ Displays progress bar for bulk operations
๐ Installation
Install Log Color Cleaner globally using npm:
npm install -g log-color-cleaner
๐ Usage
Basic Usage
clean-log <path-to-log-file-or-directory>
Examples Clean a single log file:
clean-log /path/to/your/logfile.log
Clean all log files in a directory:
clean-log /path/to/your/log/directory
Language Support The tool automatically detects your system language. To manually set the language, use the LANG environment variable:
LANG=ko clean-log /path/to/logs # Korean
LANG=en clean-log /path/to/logs # English
๐ ๏ธ How It Works
The tool scans the given file or directory for .log files. It reads each log file and removes all ANSI color codes. A new file is created with the suffix '_cleaned' for each processed log file. Original files are left untouched.
๐ Requirements
Node.js 12.0.0 or higher
๐ค Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
๐ License
This project is MIT licensed.
๐จโ๐ป Author
Alex Kang
GitHub: @yourusername LinkedIn: @yourlinkedin
๐ก If you find this tool helpful, please consider giving it a star on GitHub and sharing it with others!
Changelog
1.1.0 - 2024-10-05
Changes
- The
overwrite
option in theremoveColorCodes
function now overwrites the original file instead of deleting it. Added
help
command to provide usage instructions directly from the command line.
1.1.1 - 2024-10-05
Changes
- fix localization default en