summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff52cc3)
raw | patch | inline | side by side (parent: ff52cc3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Jun 2010 11:24:20 +0000 (11:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Jun 2010 11:24:20 +0000 (11:24 +0000) |
-Allow simple log messages without objectType/object and attributes.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18833 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18833 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_configRegistry.inc | patch | blob | history | |
gosa-core/include/class_log.inc | patch | blob | history |
diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc
index 47355e5747c17b980a253698bb6a1e878732ccae..7b864e5b881aa4f72c06c0b48815ef8dbb79f43d 100644 (file)
if(isset($this->activePlugins[strtolower($cname)])){
$this->pluginRequirements[$cname] = $defs['plRequirements'];
}else{
- new log("debug","schemaValidation","Skipped schema check for '{$cname}' plugin is inactive!",
+ new log("debug","","Skipped schema check for '{$cname}' plugin is inactive!",
array(),'');
}
}
$this->schemaCheckFailed = TRUE;
$failure = TRUE;
- new log("debug","schemaValidation","LDAP objectClass missing '{$oc}'!",
+ new log("debug","","LDAP objectClass missing '{$oc}'!",
array(),'');
}elseif(!empty($version)){
$this->schemaCheckFailed = TRUE;
$failure = TRUE;
- new log("debug","schemaValidation","LDAP objectClass version mismatch '{$oc}' ".
+ new log("debug","","LDAP objectClass version mismatch '{$oc}' ".
"has '{$currentVersion}' but {$version} required!",
array(),'');
}
index 342135cabd9bed4c67e97b231323b1d2b60d5c05..b03687de7ef086ec8acea8499efafc0957311f5b 100644 (file)
$msgs[] = sprintf(_("Invalid option %s specified!"), bold($entry['action']));
}
- if(!isset($entry['objecttype']) || empty($entry['objecttype'])){
+ if(!isset($entry['objecttype'])){
$msgs[] = _("Specified 'objectType' is empty or invalid!");
}
function log_into_syslog($entry)
{
$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'];
+
+ if(!empty($entry['action'])) $str .= "({$entry['action']}) ";
+
+ // Add object and object type if set.
+ if(!empty($entry['object']) && !empty($entry['objecttype'])){
+ $str .= "{$entry['object']} of type {$entry['objecttype']} ";
+ }elseif(!empty($entry['object'])){
+ $str .= "{$entry['object']} ";
+ }elseif(!empty($entry['objecttype'])){
+ $str .= "{$entry['objecttype']} ";
}
+ if(!empty($entry['changes'])) $str .= "{$entry['changes']} ";
+ if(!empty($entry['result'])) $str .= ": {$entry['result']} ";
+
gosa_log($str);
}