You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
378 B
PHP

<?php
/**
* Write a log entry.
* This should be used to log user's activity.
*
* @param string $message
*/
function engelsystem_log($message)
{
$nick = "Guest";
$logger = app('logger');
$user = auth()->user();
if ($user) {
$nick = User_Nick_render($user);
}
$logger->info('{nick}: {message}', ['nick' => $nick, 'message' => $message]);
}