Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 10, 2024 via composer

consolidation/log 3.0.0

Improved Psr-3 / Psr\Log logger based on Symfony Console components.
Package summary
Share
0
issues
1
license
11
MIT
Package created
5 Mar 2016
Version published
5 Apr 2022
Maintainers
1
Total deps
11
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
11 Packages, Including:
consolidation/log@3.0.0
psr/container@2.0.2
psr/log@3.0.0
symfony/console@v6.4.7
symfony/deprecation-contracts@v3.5.0
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-intl-grapheme@v1.29.0
symfony/polyfill-intl-normalizer@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/service-contracts@v3.5.0
symfony/string@v7.0.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of consolidation/log 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
psr/log3.0.06.77 kBMIT
prod dev
symfony/consolev6.4.7-MIT
prod

Visualizations

Frequently Asked Questions

What does consolidation/log do?

The Consolidation/Log package serves as an advanced PSR-3 and Psr\Log logger, built on Symfony Console components. This upgraded logger is specifically designed to give you stylish, standard error log outputs that are PSR-3 compatible. It is utilized in the popular task automation tool, Robo, highlighting its functionality and reliability. The key attribute of Consolidation/Log is its ability to support string interpolation, not natively provided by Psr\Log, thereby allowing easy substitution of replacements in logged messages.

How do you use consolidation/log?

To use Consolidation/Log, start by creating a new instance of the Logger, using an output object as the argument. Optionally, you can set a custom LogOutputStyler. To log a warning, use the warning method of the Logger instance, passing a message and an associated array of replacements if necessary.

Here's an example:

$logger = new \Consolidation\Log\Logger($output);
$logger->setLogOutputStyler(new LogOutputStyler()); // optional
$logger->warning('The file {name} does not exist.', ['name' => $filename]);

For applications that need one or more loggers, the package offers a Logger manager. You create a new LoggerManager instance, then add a logger to it using the add method. An identifier and a new Logger instance are required as arguments.

$logger = new \Consolidation\Log\LoggerManager();
$logger->add('default', new \Consolidation\Log\Logger($output));

Where are the consolidation/log docs?

For more in-depth knowledge on how to benefit from Consolidation/Log's capabilities, reviews, and usage examples, the documentation is readily available on the GitHub repository README page - https://github.com/consolidation/log. The README provides detailed insights about the package's motivation, functionality, usage examples, and how it compares to other existing solutions in the market. Feel free to visit the link to further grasp the capabilities of using this advanced and stylish logger for your PHP projects.