summaryrefslogtreecommitdiff
path: root/includes/sys_log.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-11-28 15:43:51 +0100
committerGitHub <noreply@github.com>2017-11-28 15:43:51 +0100
commit599f2fd264bfc7b1b6826fe206442806e317340f (patch)
tree50cf84d7d07d11bd65b45c2c17f37632f6cd8eff /includes/sys_log.php
parenta5fc5bd0979e8de1fce8a8addd351a6e7bd6aeb8 (diff)
parenteda7f7788ea8012bd8be46405c56a666c11f3fa5 (diff)
Merge pull request #365 from engelsystem/feature-igel-rewrite
Feature igel rewrite
Diffstat (limited to 'includes/sys_log.php')
-rw-r--r--includes/sys_log.php41
1 files changed, 11 insertions, 30 deletions
diff --git a/includes/sys_log.php b/includes/sys_log.php
index 66c323c1..513586e6 100644
--- a/includes/sys_log.php
+++ b/includes/sys_log.php
@@ -4,36 +4,17 @@
* Write a log entry.
* This should be used to log user's activity.
*
- * @param
- * $message
+ * @param string $message
*/
-function engelsystem_log($message) {
- global $user;
-
- $nick = "Guest";
- if (isset($user)) {
- $nick = User_Nick_render($user);
- }
- LogEntry_create($nick, $message);
-}
+function engelsystem_log($message)
+{
+ global $user;
+ $nick = "Guest";
+ $logger = app('logger');
-/**
- * Generates a PHP Stacktrace.
- */
-function debug_string_backtrace() {
- ob_start();
- debug_print_backtrace();
- $trace = ob_get_contents();
- ob_end_clean();
-
- // Remove first item from backtrace as it's this function which
- // is redundant.
- $trace = preg_replace('/^#0\s+' . __FUNCTION__ . "[^\n]*\n/", '', $trace, 1);
-
- // Renumber backtrace items.
- // $trace = preg_replace('/^#(\d+)/me', '\'#\' . ($1 - 1)', $trace);
-
- return $trace;
-}
+ if (isset($user)) {
+ $nick = User_Nick_render($user);
+ }
-?> \ No newline at end of file
+ $logger->info('{nick}: {message}', ['nick' => $nick, 'message' => $message]);
+}