Hello Devs,
I recently had the crazy idea of developing a PHP package for logging errors in scripts.
As I started on building my very first package, the experience was nothing short of thrilling. The first question that I asked myself was "Why should I create this?" The answer soon followed.
I wanted a command-line tool that not only logs errors but does so in a vibrant, visually engaging way. With that in my mind, I opened my favorite code editor, turned to the PHP documentation, and began turning this idea into reality.
The package is simple and effective. It logs messages in PHP Scripts and presents them in a beautiful, colorful format, making debugging not only easier but also more enjoyable! You can check it out on Packagist ckoumpis/php-prompt
Here's a quick example of how you can use it:
Console::log("Hello from ckoumpis/php-prompt!"); Console::success("Operation successful!"); Console::error("An error occurred!"); Console::warning("Warning");Console::blue("This is a blue message"); Console::magenta("This is a magenta message"); Console::cyan("Cyan message for notification");
The package also includes progress bars and spinners for better feedback in long running scripts:
for($i = 1; $iOr with steps
ProgressBar::withSteps(1, 10, 1);For Spinners
for($i = 0; $iOr with Steps
Spinner::withSteps(0, 10, 1);Collaboration
I welcome anyone to contribute in the project. I would love for others to join me in making this tool even better. Together we can build something cool and useful.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3