1.1.1 โ€ข Published 10 months ago

clear_color_log v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Log Color Cleaner ๐Ÿงน๐ŸŽจ

npm version license downloads

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 the removeColorCodes 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
1.1.1

10 months ago

1.1.0

10 months ago

1.0.0

11 months ago