improves logging for user sync
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 31 Jul 2014 21:02:27 +0000 (23:02 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 1 Aug 2014 10:25:57 +0000 (12:25 +0200)
Change-Id: I3f1393512fe5124dce99e71cff04e728924c0d42
Reviewed-on: http://gerrit.tine20.com/customers/921
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/User.php

index 8e84771..3107046 100644 (file)
@@ -609,10 +609,14 @@ class Tinebase_User
      */
     public static function syncUsers($options)
     {
-        Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ .' start synchronizing users');
+        if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ 
+            .' Start synchronizing users ...');
         
         $users = Tinebase_User::getInstance()->getUsersFromSyncBackend(NULL, NULL, 'ASC', NULL, NULL, 'Tinebase_Model_FullUser');
         
+        if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
+            . ' About to sync ' . count($users) . ' users from sync backend ...');
+        
         foreach ($users as $user) {
             try {
                 $user = self::syncUser($user, $options);