summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4844314)
raw | patch | inline | side by side (parent: 4844314)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Mar 2008 07:27:05 +0000 (07:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Mar 2008 07:27:05 +0000 (07:27 +0000) |
-Added logging
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9408 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9408 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_gosaSupportDaemon.inc | patch | blob | history |
diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index 6d6b3b4a2a987b96bfbe0fc071286f080bf2334b..7d2ec9751b459b45e5de4706dfba9c20fd9af7a4 100644 (file)
}else{
$this->set_error($this->o_sock->get_error());
$this->disconnect();
+ new log("debug","gosaSupportDaemon::connect()", "Could not connect to server.", array(),$this->get_error());
}
return($this->is_connected);
}
$str = $this->o_sock->read();
$entries = $this->xml_to_array($str);
if(isset($entries['XML']) || isset($entries['COUNT'])){
+ new log("debug","DaemonEvent (IDS) ", "gosaSupportDaemon::remove_entries()", $ids,"SUCCESS");
return(TRUE);
+ }else{
+ new log("debug","DaemonEvent (IDS) ", "gosaSupportDaemon::remove_entries()", $ids,"FAILED ".$this->get_error());
}
}
return(FALSE);
*/
public function remove_entry($id)
{
- $this->reset_error();
-
- $xml_msg = "<xml>
- <header>gosa_delete_jobdb_entry</header>
- <target>GOSA</target>
- <source>GOSA</source>
- <where>
- <clause>
- <phrase>
- <operator>eq</operator>
- <id>".$id."</id>
- </phrase>
- </clause>
- </where>
- </xml>";
- if($this->connect()){
- $this->o_sock->write($xml_msg);
- $str = $this->o_sock->read();
- $entries = $this->xml_to_array($str);
- if(isset($entries['XML'])){
- return(TRUE);
- }
- }
- return(FALSE);
+ return($this->remove_entries(array($id)));
}
if(isset($entries['XML'])){
if(isset($entries['XML']['ERROR_STRING'])) {
$this->set_error($entries['XML']['ERROR_STRING']);
+ new log("debug","DaemonEvent (IDS) ", "gosaSupportDaemon::update_entries()", $ids,"FAILED setting (".$attr.") error was ".$this->get_error());
return(FALSE);
}
+ new log("debug","DaemonEvent (IDS) ", "gosaSupportDaemon::update_entries()", $ids,"SUCCESS");
return(TRUE);
}
}
$ret = $entries;
if(isset($entries['XML']['ERROR_STRING'])) {
$this->set_error($entries['XML']['ERROR_STRING']);
+ new log("debug","DaemonEvent (IDS) ", "gosaSupportDaemon::_send()", array($data=>$data),"FAILED ".$this->get_error());
+ }else{
+ new log("debug","DaemonEvent (IDS) ", "gosaSupportDaemon::_send()", array($data=>$data),"SUCCESS");
}
}
+ }else{
+ new log("debug","DaemonEvent (IDS) ", "gosaSupportDaemon::_send()", array($data=>$data),"Fire & forget, not result.! ".$this->get_error());
}
}
return($ret);
</xml>
";
- new log("debug","gosaSupportDaemon::clean_queue_from_mac", "Removing all entries for mac ".$mac."", array(),"follows next.");
+ new log("debug","DaemonEvent ", "gosaSupportDaemon::clean_queue_from_mac()", array($mac => $mac)," start cleaning.");
$data = $this->_send($xml_msg,TRUE);
if(is_array($data) && isset($data['XML'])){
$tmp->set_type(TRIGGERED_EVENT);
if(!$this->append($tmp)){
msg_dialog::display(_("Error"), sprintf(_("Cannot send abort event for entry: %s"),$entry['ID']) , ERROR_DIALOG);
- new log("debug","gosaSupportDaemon::clean_queue_from_mac",
- "Sending 'DaemonEvent_faireboot' for ID '".$entry['ID']."' FAILED!",array(), "FAILED");
+ new log("debug","DaemonEvent ", "gosaSupportDaemon::clean_queue_from_mac()", array($mac => $mac),
+ "FAILED, could not send 'DaemonEvent_faireboot' for entry ID (".$entry['ID'].") - ".$this->get_error());
}else{
- new log("debug","gosaSupportDaemon::clean_queue_from_mac",
- "Sending 'DaemonEvent_faireboot' for ID '".$entry['ID']."' successfull",array(), "SUCCESS");
+ new log("debug","DaemonEvent ", "gosaSupportDaemon::clean_queue_from_mac()", array($mac => $mac),
+ "SUCCESS, send 'DaemonEvent_faireboot' for entry ID (".$entry['ID'].")");
}
;break;
}else{
*/
if(!$this->remove_entries(array($entry['ID']))){
msg_dialog::display(_("Error"), sprintf(_("Cannot remove entry: %s"),$entry['ID']) , ERROR_DIALOG);
- new log("debug","gosaSupportDaemon::clean_queue_from_mac",
- "Removing entry ID '".$entry['ID']."' FAILED!",array(), "FAILED");
- }else{
- new log("debug","gosaSupportDaemon::clean_queue_from_mac",
- "Removing entry ID '".$entry['ID']."' successfull!",array(),"SUCCESS");
}
;break;
}