2012-12-26 14:02:27 +01:00
|
|
|
<?php
|
|
|
|
|
2019-04-29 23:17:58 +02:00
|
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
use Psr\Log\LogLevel;
|
|
|
|
|
2012-12-26 14:02:27 +01:00
|
|
|
/**
|
2013-10-13 00:52:44 +02:00
|
|
|
* Write a log entry.
|
|
|
|
* This should be used to log user's activity.
|
|
|
|
*
|
2017-01-03 03:22:48 +01:00
|
|
|
* @param string $message
|
2019-04-29 23:17:58 +02:00
|
|
|
* @param string $level
|
2012-12-26 14:02:27 +01:00
|
|
|
*/
|
2019-04-29 23:17:58 +02:00
|
|
|
function engelsystem_log($message, $level = LogLevel::INFO)
|
2017-01-02 03:57:23 +01:00
|
|
|
{
|
2019-04-29 23:17:58 +02:00
|
|
|
/** @var LoggerInterface $logger */
|
2017-09-19 19:33:24 +02:00
|
|
|
$logger = app('logger');
|
2020-02-29 20:53:25 +01:00
|
|
|
$logger->log($level, $message);
|
2012-12-26 14:02:27 +01:00
|
|
|
}
|