blob: 513586e6b4993487ccb6a93245b2d19247c1b4df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<?php
/**
* Write a log entry.
* This should be used to log user's activity.
*
* @param string $message
*/
function engelsystem_log($message)
{
global $user;
$nick = "Guest";
$logger = app('logger');
if (isset($user)) {
$nick = User_Nick_render($user);
}
$logger->info('{nick}: {message}', ['nick' => $nick, 'message' => $message]);
}
|