From: hickert Date: Tue, 15 May 2007 08:27:29 +0000 (+0000) Subject: Added logging to some services X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c25304f2f149f9f987fc897a23586f56ba2fee33;p=gosa.git Added logging to some services git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6382 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_goImapServer.inc b/plugins/admin/systems/class_goImapServer.inc index 8a95ed7ad..95d5d87dc 100644 --- a/plugins/admin/systems/class_goImapServer.inc +++ b/plugins/admin/systems/class_goImapServer.inc @@ -45,7 +45,7 @@ class goImapServer extends goService { function goImapServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("IMAP/POP3 service"); diff --git a/plugins/admin/systems/class_goKrbServer.inc b/plugins/admin/systems/class_goKrbServer.inc index d753d15e2..edcc58f0f 100644 --- a/plugins/admin/systems/class_goKrbServer.inc +++ b/plugins/admin/systems/class_goKrbServer.inc @@ -26,7 +26,7 @@ class goKrbServer extends goService{ function goKrbServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("Kerberos service"); } diff --git a/plugins/admin/systems/class_goLdapServer.inc b/plugins/admin/systems/class_goLdapServer.inc index 5bce18539..f4b2dccf2 100644 --- a/plugins/admin/systems/class_goLdapServer.inc +++ b/plugins/admin/systems/class_goLdapServer.inc @@ -24,7 +24,7 @@ class goLdapServer extends goService{ function goLdapServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("LDAP service"); } diff --git a/plugins/admin/systems/class_goLogDBServer.inc b/plugins/admin/systems/class_goLogDBServer.inc index 31ad8e8dc..77ac6250c 100644 --- a/plugins/admin/systems/class_goLogDBServer.inc +++ b/plugins/admin/systems/class_goLogDBServer.inc @@ -26,7 +26,7 @@ class goLogDBServer extends goService{ function goLogDBServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("Logging database"); } diff --git a/plugins/admin/systems/class_goMailServer.inc b/plugins/admin/systems/class_goMailServer.inc index bb25b15bd..0e28173b0 100644 --- a/plugins/admin/systems/class_goMailServer.inc +++ b/plugins/admin/systems/class_goMailServer.inc @@ -42,7 +42,7 @@ class goMailServer extends goService{ function goMailServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("Mail smtp service (Postfix)"); $this->Actions = array( SERVICE_STOPPED=>SERVICE_STOPPED, @@ -577,8 +577,10 @@ class goMailServer extends goService{ show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/mail with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ $this->handle_post_events("modify"); + @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); + @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc index f51f9b211..d64c45d2c 100644 --- a/plugins/admin/systems/class_goNtpServer.inc +++ b/plugins/admin/systems/class_goNtpServer.inc @@ -25,7 +25,7 @@ class goNtpServer extends goService{ function goNtpServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("Time service (NTP)"); /* Load arrays */ @@ -93,8 +93,10 @@ class goNtpServer extends goService{ show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/goNtpServer with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ $this->handle_post_events("modify"); + @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); + @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_goService.inc b/plugins/admin/systems/class_goService.inc index 515be0eb8..a73ff751e 100644 --- a/plugins/admin/systems/class_goService.inc +++ b/plugins/admin/systems/class_goService.inc @@ -112,16 +112,16 @@ class goService extends plugin{ if($ldap->count()){ $ldap->cd($this->dn); $ldap->modify($this->attrs); - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } if($this->initially_was_account){ + @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("modify"); }else{ $this->handle_post_events("add"); + @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/".get_class($this)." - (".$this->DisplayName.") with dn '%s' failed."),$this->dn)); } diff --git a/plugins/admin/systems/class_goShareServer.inc b/plugins/admin/systems/class_goShareServer.inc index 5f580dde9..11ed781ba 100644 --- a/plugins/admin/systems/class_goShareServer.inc +++ b/plugins/admin/systems/class_goShareServer.inc @@ -27,7 +27,7 @@ class goShareServer extends goService{ function goShareServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("File service"); @@ -187,8 +187,10 @@ class goShareServer extends goService{ show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/shares with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ $this->handle_post_events("modify"); + @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); + @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_goSpamServer.inc b/plugins/admin/systems/class_goSpamServer.inc index a5ac7fa56..a7cb30dce 100644 --- a/plugins/admin/systems/class_goSpamServer.inc +++ b/plugins/admin/systems/class_goSpamServer.inc @@ -45,7 +45,7 @@ class gospamserver extends goService{ function gospamserver($config,$dn, $parent= NULL) { /* Init class */ - plugin::plugin($config,$dn, $parent); + goService::goService($config,$dn, $parent); $this->DisplayName = _("Spamassassin"); /* Get userinfo & acls */ @@ -270,8 +270,10 @@ class gospamserver extends goService{ } if($this->initially_was_account){ $this->handle_post_events("modify"); + @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); + @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/spamassassin with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/systems/class_goSyslogServer.inc b/plugins/admin/systems/class_goSyslogServer.inc index da96ea330..382d594f0 100644 --- a/plugins/admin/systems/class_goSyslogServer.inc +++ b/plugins/admin/systems/class_goSyslogServer.inc @@ -24,7 +24,7 @@ class goSyslogServer extends goService{ function goSyslogServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("Logging service"); } diff --git a/plugins/admin/systems/class_goTerminalServer.inc b/plugins/admin/systems/class_goTerminalServer.inc index fea6e77db..1b1eeecf5 100644 --- a/plugins/admin/systems/class_goTerminalServer.inc +++ b/plugins/admin/systems/class_goTerminalServer.inc @@ -27,7 +27,7 @@ class goTerminalServer extends goService{ function goTerminalServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("Terminal service"); } @@ -78,8 +78,10 @@ class goTerminalServer extends goService{ show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/terminalServer with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ $this->handle_post_events("modify"); + @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); + @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc index 2cc0a1b1a..a469988f8 100644 --- a/plugins/admin/systems/class_goVirusServer.inc +++ b/plugins/admin/systems/class_goVirusServer.inc @@ -43,7 +43,7 @@ class govirusserver extends goService{ function govirusserver($config,$dn, $parent= NULL) { /* Init class */ - plugin::plugin($config,$dn, $parent); + goService::goService($config,$dn, $parent); $this->DisplayName = _("Anti virus"); /* Get userinfo & acls */ @@ -140,8 +140,10 @@ class govirusserver extends goService{ } if($this->initially_was_account){ $this->handle_post_events("modify"); + @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); + @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/anti virus with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/systems/class_gosaLogServer.inc b/plugins/admin/systems/class_gosaLogServer.inc index 51288754e..8bd11cc1b 100644 --- a/plugins/admin/systems/class_gosaLogServer.inc +++ b/plugins/admin/systems/class_gosaLogServer.inc @@ -23,7 +23,7 @@ class gosaLogServer extends goService{ function gosaLogServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("GOsa logging service"); }