mirror of
https://github.com/quentin-g-dev/afup.git
synced 2026-03-25 17:52:13 +01:00
17 lines
323 B
PHP
17 lines
323 B
PHP
<?php
|
|
|
|
namespace Afup\Site\Logger;
|
|
|
|
use Afup\Site\Utils\Logs;
|
|
use AppBundle\Association\Model\User;
|
|
|
|
trait DbLoggerTrait
|
|
{
|
|
public function log($message, User $user = null)
|
|
{
|
|
$id = null !== $user ? $user->getId() : 0;
|
|
Logs::initialiser($GLOBALS['AFUP_DB'], $id);
|
|
Logs::log($message);
|
|
}
|
|
}
|