Awesome
<h1 align="center">
<img src="https://github.com/orisai/.github/blob/main/images/repo_title.png?raw=true" alt="Orisai"/>
<br/>
Nette Monolog
</h1>
<p align="center">
<a href="https://github.com/Seldaek/monolog">Monolog</a> logger integration for Nette
</p>
<p align="center">
š Check out our <a href="docs/README.md">documentation</a>.
</p>
<p align="center">
šø If you like Orisai, please <a href="https://orisai.dev/sponsor">make a donation</a>. Thank you!
</p>
<p align="center">
<a href="https://github.com/orisai/nette-monolog/actions?query=workflow:CI+branch:v1.x"><img src="https://github.com/orisai/nette-monolog/actions/workflows/ci.yaml/badge.svg?branch=v1.x"></a>
<a href="https://coveralls.io/github/orisai/nette-monolog?branch=v1.x"><img src="https://badgen.net/coveralls/c/github/orisai/nette-monolog/v1.x?cache=300"></a>
<a href="https://dashboard.stryker-mutator.io/reports/github.com/orisai/nette-monolog/v1.x"><img src="https://img.shields.io/endpoint?style=flat&url=https://badge-api.stryker-mutator.io/github.com/orisai/nette-monolog/v1.x"></a>
<a href="https://packagist.org/packages/orisai/nette-monolog"><img src="https://badgen.net/packagist/dt/orisai/nette-monolog?cache=3600"></a>
<a href="https://packagist.org/packages/orisai/nette-monolog"><img src="https://badgen.net/packagist/v/orisai/nette-monolog?cache=3600"></a>
<a href="https://choosealicense.com/licenses/mpl-2.0/"><img src="https://badgen.net/badge/license/MPL-2.0/blue?cache=3600"></a>
<p>
use Psr\Log\LoggerInterface;
final class ImportantCode
{
private LoggerInterface $logger;
public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
}
public function doSomethingImportant(): void
{
try {
// Dark magic
$this->logger->info('Everything is fine!');
} catch (WeHaveAProblemHouston $e) {
$this->logger->critical('Dumpster fire!', [
'exception' => $e,
]);
}
}
}