当前位置: 首页>>代码示例>>PHP>>正文


PHP AEUtilLogger::openLog方法代码示例

本文整理汇总了PHP中AEUtilLogger::openLog方法的典型用法代码示例。如果您正苦于以下问题:PHP AEUtilLogger::openLog方法的具体用法?PHP AEUtilLogger::openLog怎么用?PHP AEUtilLogger::openLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AEUtilLogger的用法示例。


在下文中一共展示了AEUtilLogger::openLog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 /**
  * Loads the factory from the storage (if it exists) and returns a reference to the
  * Kettenrad object.
  *
  * @param $tag string The backup tag to load
  *
  * @return AECoreKettenrad A reference to the Kettenrad object
  */
 public static function &load($tag = null)
 {
     if (is_null($tag) && defined('AKEEBA_BACKUP_ORIGIN')) {
         $tag = AKEEBA_BACKUP_ORIGIN;
     }
     // In order to load anything, we need to have the correct profile loaded. Let's assume
     // that the latest backup record in this tag has the correct profile number set.
     $config = AEFactory::getConfiguration();
     if (empty($config->activeProfile)) {
         // Only bother loading a configuration if none has been already loaded
         $statList = AEPlatform::getInstance()->get_statistics_list(array('filters' => array(array('field' => 'tag', 'value' => $tag)), 'order' => array('by' => 'id', 'order' => 'DESC')));
         if (is_array($statList)) {
             $stat = array_pop($statList);
             $profile = $stat['profile_id'];
             AEPlatform::getInstance()->load_configuration($profile);
         }
     }
     AEUtilLogger::openLog($tag);
     AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Kettenrad :: Attempting to load from database ({$tag})");
     $serialized_factory = AEUtilTempvars::get($tag);
     if ($serialized_factory !== false) {
         AEUtilLogger::WriteLog(_AE_LOG_DEBUG, " -- Loaded stored Akeeba Factory ({$tag})");
         AEFactory::unserialize($serialized_factory);
     } else {
         // There is no serialized factory. Nuke the in-memory factory.
         AEUtilLogger::WriteLog(_AE_LOG_DEBUG, " -- Stored Akeeba Factory ({$tag}) not found - hard reset");
         AEFactory::nuke();
         AEPlatform::getInstance()->load_configuration();
     }
     unset($serialized_factory);
     return AEFactory::getKettenrad();
 }
开发者ID:greyhat777,项目名称:vuslinterliga,代码行数:40,代码来源:kettenrad.php

示例2: execute


//.........这里部分代码省略.........
                echo "Backup engine returned an error. Technical information:\n";
                echo "Error message:\n\n";
                echo $e->getMessage() . "\n\n";
                echo "Path to " . basename(__FILE__) . ":" . __DIR__ . "\n";
                echo "Path to factory file: {$factoryPath}\n";
                die("\n");
            }
        }
        // Forced CLI mode settings
        define('AKEEBA_PROFILE', $profile);
        define('AKEEBA_BACKUP_ORIGIN', 'cli');
        // Force loading CLI-mode translation class
        $dummy = new AEUtilTranslate();
        // Load the profile
        AEPlatform::getInstance()->load_configuration($profile);
        // Reset Kettenrad and its storage
        AECoreKettenrad::reset(array('maxrun' => 0));
        AEUtilTempvars::reset(AKEEBA_BACKUP_ORIGIN);
        // Setup
        $kettenrad = AEFactory::getKettenrad();
        $options = array('description' => $description, 'comment' => '');
        if (!empty($overrides)) {
            AEPlatform::getInstance()->configOverrides = $overrides;
        }
        $kettenrad->setup($options);
        // Dummy array so that the loop iterates once
        $array = array('HasRun' => 0, 'Error' => '');
        $warnings_flag = false;
        while ($array['HasRun'] != 1 && empty($array['Error'])) {
            // Recycle the database conenction to minimise problems with database timeouts
            $db = AEFactory::getDatabase();
            $db->close();
            $db->open();
            AEUtilLogger::openLog(AKEEBA_BACKUP_ORIGIN);
            AEUtilLogger::WriteLog(true, '');
            // Apply overrides in the command line
            if (!empty($overrides)) {
                $config = AEFactory::getConfiguration();
                foreach ($overrides as $key => $value) {
                    $config->set($key, $value);
                }
            }
            // Apply engine optimization overrides
            $config = AEFactory::getConfiguration();
            $config->set('akeeba.tuning.min_exec_time', 0);
            $config->set('akeeba.tuning.nobreak.beforelargefile', 1);
            $config->set('akeeba.tuning.nobreak.afterlargefile', 1);
            $config->set('akeeba.tuning.nobreak.proactive', 1);
            $config->set('akeeba.tuning.nobreak.finalization', 1);
            $config->set('akeeba.tuning.settimelimit', 0);
            $config->set('akeeba.tuning.nobreak.domains', 0);
            $kettenrad->tick();
            AEFactory::getTimer()->resetTime();
            $array = $kettenrad->getStatusArray();
            AEUtilLogger::closeLog();
            $time = date('Y-m-d H:i:s \\G\\M\\TO (T)');
            $memusage = $this->memUsage();
            $warnings = "no warnings issued (good)";
            $stepWarnings = false;
            if (!empty($array['Warnings'])) {
                $warnings_flag = true;
                $warnings = "POTENTIAL PROBLEMS DETECTED; " . count($array['Warnings']) . " warnings issued (see below).\n";
                foreach ($array['Warnings'] as $line) {
                    $warnings .= "\t{$line}\n";
                }
                $stepWarnings = true;
开发者ID:sillysachin,项目名称:teamtogether,代码行数:67,代码来源:akeeba-backup.php


注:本文中的AEUtilLogger::openLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。