Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 1.9 KB

README.md

File metadata and controls

57 lines (45 loc) · 1.9 KB

Orisai
Nette Monolog

Monolog logger integration for Nette

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

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,
			]);
		}
	}

}