clear_color_log
v1.1.1
Published
A CLI tool to remove color codes from log files
Downloads
4
Readme
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