PHPackages                             filipemansano/log-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. filipemansano/log-helper

ActiveLibrary[CLI &amp; Console](/categories/cli)

filipemansano/log-helper
========================

helper to display and manipulate messages in console with php

v1.0(6y ago)1140MITPHP

Since Feb 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/filipemansano/log-helper)[ Packagist](https://packagist.org/packages/filipemansano/log-helper)[ RSS](/packages/filipemansano-log-helper/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Log Console Helper
==================

[](#log-console-helper)

helper to display and manipulate messages in console with php

how to use?
-----------

[](#how-to-use)

is simple, you can download the master branch or install package via composer

```
  composer require filipemansano/log-helper

```

get instance

```
require 'vendor/autoload.php';
use FilipeMansano\Log;
$log = Log::getInstance();
```

and now, print your messages in console

```
$log->printMessage("This is a simple text");
$log->printMessage("----------------------");
$log->printMessage("now the font color is red!", Log::FOREGROUND_RED);
$log->printMessage("----------------------");
$log->printMessage("now the back color is green and the font is white!", Log::FOREGROUND_WHITE, Log::BACKGROUND_GREEN);
$log->printMessage("----------------------");
$log->printMessage("in ", Log::FOREGROUND_GREEN, Log::BACKGROUND_BLACK,0);
$log->printMessage("the ", Log::FOREGROUND_YELLOW, Log::BACKGROUND_BLACK,0);
$log->printMessage("same ", Log::FOREGROUND_BLUE, Log::BACKGROUND_BLACK,0);
$log->printMessage("line ", Log::FOREGROUND_MAGENTA, Log::BACKGROUND_BLACK,0);
$log->printMessage("multiples ", Log::FOREGROUND_BLACK, Log::BACKGROUND_RED,0);
$log->printMessage("color ", Log::FOREGROUND_WHITE, Log::BACKGROUND_MAGENTA,0);
$log->printMessage("scheme ", Log::FOREGROUND_LIGHT_MAGENTA, Log::BACKGROUND_LIGHT_GREY,1);
$log->printMessage("----------------------");
$log->printError("printing a example of exception", (new \Exception("Error Description", 500)));
$log->printMessage("----------------------");
```

### output

[](#output)

[![Image of output](https://camo.githubusercontent.com/f3b1822d7b83b33cea4e3c9bc5aaa9144c30d8ac28e99fd7d19d24842d0106e0/68747470733a2f2f692e696d6775722e636f6d2f706561736f64542e706e67)](https://camo.githubusercontent.com/f3b1822d7b83b33cea4e3c9bc5aaa9144c30d8ac28e99fd7d19d24842d0106e0/68747470733a2f2f692e696d6775722e636f6d2f706561736f64542e706e67)

Replace Text in console
-----------------------

[](#replace-text-in-console)

you can replace the last text printed with another, a comum case is display percent of loading, e.g.

```
for ($i=1; $i printMessage("Text replace ({$i}%)", Log::FOREGROUND_WHITE, Log::BACKGROUND_BLACK, Log::REPLACE_LAST_MESSAGE);
    usleep(50000);
}

$log->printMessage("Text replace ", Log::FOREGROUND_WHITE, Log::BACKGROUND_BLACK, Log::REPLACE_LAST_MESSAGE);
$log->printMessage("[DONE]", Log::FOREGROUND_GREEN);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2288d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22ccc3c23ba34c1df7f3939673981b75ff1ff28f85f6084bf6a4497a255feedf?d=identicon)[filipemansano](/maintainers/filipemansano)

---

Top Contributors

[![filipemansano](https://avatars.githubusercontent.com/u/6247393?v=4)](https://github.com/filipemansano "filipemansano (9 commits)")

### Embed Badge

![Health badge](/badges/filipemansano-log-helper/health.svg)

```
[![Health](https://phpackages.com/badges/filipemansano-log-helper/health.svg)](https://phpackages.com/packages/filipemansano-log-helper)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M319](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
