From 6c5782349412b55df7daa79747434ef8711dce6c Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 16 Oct 2009 15:15:53 +0000 Subject: [PATCH] Cleanup logging messages git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14599 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_log.inc | 7 ++++++- gosa-core/include/functions.inc | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gosa-core/include/class_log.inc b/gosa-core/include/class_log.inc index fbdbb371c..33e58523a 100644 --- a/gosa-core/include/class_log.inc +++ b/gosa-core/include/class_log.inc @@ -127,7 +127,12 @@ class log { /* This function is used to into the systems syslog */ function log_into_syslog($entry) { - $str = $entry['user']." ".$entry['action']." ".$entry['object']." from type ".$entry['objecttype']." ".$entry['changes']." : Result was ".$entry['result']; + $str= ""; + if (empty($entry['object']) && empty($entry['changes'])) { + $str = "(".$entry['action'].") ".$entry['objecttype'].": ".$entry['result']; + } else { + $str = "(".$entry['action'].") ".$entry['object']." of type ".$entry['objecttype']." ".$entry['changes'].": ".$entry['result']; + } gosa_log($str); } diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index aa28014a0..d9a82de75 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -309,14 +309,14 @@ function gosa_log ($message) global $ui; /* Preset to something reasonable */ - $username= " unauthenticated"; + $username= "[unauthenticated]"; /* Replace username if object is present */ if (isset($ui)){ if ($ui->username != ""){ $username= "[$ui->username]"; } else { - $username= "unknown"; + $username= "[unknown]"; } } -- 2.30.2