Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory fusiondirectory
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectoryfusiondirectory
  • Issues
  • #6065
Closed
Open
Issue created Feb 04, 2020 by bmortier@bmortierMaintainer

Possibility to see debug in server logs instead of the interface

When enabling logs, they are displayed in the interface, for all users.

I would like to see logs in servers logs on the server instead.

It can be done with error_log: https://www.php.net/manual/en/function.error-log

Simple patch:

diff --git a/include/functions.inc b/include/functions.inc
index f305e99e..d78c6543 100644
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -193,6 +193,7 @@ function DEBUG ($level, $line, $function, $file, $data, $info = '')
     }
     echo '<div class="debug_div">';
     echo $output;
+    error_log($output);
     if (is_array($data)) {
       print_a($data);
     } else {

There should be a better patch, which can route the output depending on an option: interface (default) or server.

Edited Feb 25, 2020 by bmortier
Assignee
Assign to
Time tracking