當前位置: 首頁>>代碼示例>>PHP>>正文


PHP log::add方法代碼示例

本文整理匯總了PHP中log::add方法的典型用法代碼示例。如果您正苦於以下問題:PHP log::add方法的具體用法?PHP log::add怎麽用?PHP log::add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在log的用法示例。


在下文中一共展示了log::add方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 /**
  * 獲取實例
  * 
  * @return void
  * @author seatle <seatle@foxmail.com> 
  * @created time :2016-04-10 22:55
  */
 public static function init()
 {
     if (extension_loaded('Redis')) {
         $_instance = new Redis();
     } else {
         $errmsg = "extension redis is not installed";
         log::add($errmsg, "Error");
         return null;
     }
     // 這裏不能用pconnect,會報錯:Uncaught exception 'RedisException' with message 'read error on connection'
     $_instance->connect($GLOBALS['config']['redis']['host'], $GLOBALS['config']['redis']['port'], $GLOBALS['config']['redis']['timeout']);
     // 驗證
     if ($GLOBALS['config']['redis']['pass']) {
         if (!$_instance->auth($GLOBALS['config']['redis']['pass'])) {
             $errmsg = "Redis Server authentication failed!!";
             log::add($errmsg, "Error");
             return null;
         }
     }
     // 不序列化的話不能存數組,用php的序列化方式其他語言又不能讀取,所以這裏自己用json序列化了,性能還比php的序列化好1.4倍
     //$_instance->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE);     // don't serialize data
     //$_instance->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);      // use built-in serialize/unserialize
     //$_instance->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY); // use igBinary serialize/unserialize
     $_instance->setOption(Redis::OPT_PREFIX, $GLOBALS['config']['redis']['prefix'] . ":");
     return $_instance;
 }
開發者ID:jackyxie,項目名稱:phpspider,代碼行數:33,代碼來源:cache.php

示例2: runDeamon

 public static function runDeamon()
 {
     if (!file_exists('/opt/homebridge/config.json')) {
         $response = array();
         $platform = array();
         $response['description'] = "Configuration Jeedom";
         $platform['platform'] = "Jeedom";
         $platform['name'] = "Jeedom";
         $platform['jeedom_ip'] = "127.0.0.1";
         $platform['jeedom_port'] = config::byKey('internalPort');
         $platform['jeedom_url'] = config::byKey('internalComplement');
         $platform['jeedom_api_key'] = config::byKey('api');
         $response['platforms'] = array();
         $response['platforms'][] = $platform;
         $response['accessories'] = array();
         $fp = fopen('/opt/homebridge/config.json', 'w');
         fwrite($fp, json_encode($response));
         fclose($fp);
     }
     log::add('homebridge', 'info', 'Lancement du démon homebridge');
     $cmd = 'nice -n 19 /usr/bin/nodejs /opt/homebridge/app.js';
     log::add('homebridge', 'info', 'Lancement démon homebridge : ' . $cmd);
     $result = exec('nohup ' . $cmd . ' >> ' . log::getPathToLog('homebridge') . ' 2>&1 &');
     if (!self::deamonRunning()) {
         sleep(10);
         if (!self::deamonRunning()) {
             log::add('homebridge', 'error', 'Impossible de lancer le démon homebridge', 'unableStartDeamon');
             return false;
         }
     }
     message::removeAll('homebridge', 'unableStartDeamon');
     log::add('homebridge', 'info', 'Démon homebridge lancé');
 }
開發者ID:julien30,項目名稱:plugin-homebridge,代碼行數:33,代碼來源:homebridge.class.php

示例3: postNextTopStory

 function postNextTopStory()
 {
     // only post one story every three hours
     $tstamp = $this->statusObj->getState('lastTwitterPost');
     if (!isset($_GET['test']) and time() - $tstamp < 60 * TWITTER_INTERVAL_MINUTES) {
         return;
     }
     //echo 'continuing';
     require_once PATH_CORE . '/classes/content.class.php';
     $cObj = new content($this->db);
     require_once PATH_CORE . '/classes/log.class.php';
     $logObj = new log($this->db);
     $topStories = $cObj->fetchUpcomingStories();
     $uid = 1;
     while ($data = $this->db->readQ($topStories)) {
         if (!$this->checkLog($uid, $data->siteContentId) and $data->score >= TWITTER_SCORE_THRESHOLD) {
             // post to twitter
             $result = $this->update($data->siteContentId, $data->title);
             if ($result) {
                 $logItem = $logObj->serialize(0, $uid, 'postTwitter', $data->siteContentId);
                 $logObj->add($logItem);
                 $this->statusObj->setState('lastTwitterPost', time());
             }
             // only do one at a time
             return;
         }
     }
 }
開發者ID:smbale,項目名稱:open-social-media-toolkit,代碼行數:28,代碼來源:twitter.class.php

示例4: openzwave_update

function openzwave_update()
{
    if (openzwave::deamonRunning()) {
        echo 'Stop zwave network...';
        openzwave::stopDeamon();
        echo "OK\n";
    }
    echo 'Stop cron...';
    $cron = cron::byClassAndFunction('openzwave', 'pull');
    if (config::byKey('jeeNetwork::mode') != 'slave') {
        if (!is_object($cron)) {
            $cron = new cron();
        }
        $cron->setClass('openzwave');
        $cron->setFunction('pull');
        $cron->setEnable(1);
        $cron->setDeamon(1);
        $cron->setDeamonSleepTime(0.5);
        $cron->setTimeout(1440);
        $cron->setSchedule('* * * * *');
        $cron->save();
        $cron->stop();
    } else {
        if (is_object($cron)) {
            $cron->remove();
        }
    }
    echo "OK\n";
    echo 'Check zwave system...';
    if (count(eqLogic::byType('zwave')) > 0) {
        log::add('openzwave', 'error', 'Attention vous etes sur la nouvelle version d\'openzwave, des actions de votre part sont necessaire merci d\'aller voir https://jeedom.fr/blog/?p=1576');
    }
    if (config::byKey('port', 'openzwave', 'none') != 'none') {
        if (method_exists('openzwave', 'getVersion')) {
            if (version_compare(config::byKey('openzwave_version', 'openzwave'), openzwave::getVersion('openzwave'), '>')) {
                if (jeedom::getHardwareName() == 'Jeedomboard') {
                    config::save('allowStartDeamon', 0, 'openzwave');
                    openzwave::updateOpenzwave(false);
                    config::save('allowStartDeamon', 1, 'openzwave');
                } else {
                    log::add('openzwave', 'error', __('Attention votre version d\'openzwave est dépassée sur le démon local, il faut ABSOLUMENT la mettre à jour', __FILE__));
                }
            }
        }
    }
    if (config::byKey('jeeNetwork::mode') == 'master') {
        foreach (jeeNetwork::byPlugin('openzwave') as $jeeNetwork) {
            try {
                if ($jeeNetwork->configByKey('port', 'openzwave', 'none') != 'none') {
                    if (version_compare($jeeNetwork->sendRawRequest('getVersion', array('plugin' => 'openzwave', 'module' => 'openzwave')), openzwave::getVersion('openzwave'), '>')) {
                        log::add('openzwave', 'error', __('Attention votre version d\'openzwave est dépassée sur', __FILE__) . ' ' . $jeeNetwork->getName() . ' ' . __('il faut ABSOLUMENT la mettre à jour', __FILE__));
                    }
                }
            } catch (Exception $e) {
            }
        }
    }
    echo "OK\n";
}
開發者ID:stef3569,項目名稱:plugin-openzwave,代碼行數:59,代碼來源:install.php

示例5: logHourlyStats

 function logHourlyStats()
 {
     require_once PATH_CORE . '/classes/log.class.php';
     $logObj = new log($this->db);
     // record recentSessions
     $q = $this->db->query("SELECT count(id) as cnt FROM fbSessions WHERE fb_sig_time>=date_sub(NOW(), INTERVAL 10 MINUTE);");
     $data = $this->db->readQ($q);
     $cnt = $data->cnt;
     $logItem = $logObj->serialize(0, 0, 'sessionsRecent', $cnt);
     $logObj->add($logItem);
     // record sessions in last hour
     $q = $this->db->query("SELECT count(id) as cnt FROM fbSessions WHERE fb_sig_time>=date_sub(NOW(), INTERVAL 60 MINUTE);");
     $data = $this->db->readQ($q);
     $cnt = $data->cnt;
     $logItem = $logObj->serialize(0, 0, 'sessionsHour', $cnt);
     $logObj->add($logItem);
 }
開發者ID:smbale,項目名稱:open-social-media-toolkit,代碼行數:17,代碼來源:statistics.class.php

示例6: openzwave_update

function openzwave_update()
{
    log::add('openzwave', 'error', __('Après toute installation/mise à jour pensez bien à mettre à jour les dépendances Openzwave (voir documentation)', __FILE__));
    if (!file_exists(dirname(__FILE__) . '/../data')) {
        mkdir(dirname(__FILE__) . '/../data');
    }
    shell_exec('cp -R /opt/python-openzwave/xml_backups ' . dirname(__FILE__) . '/../data');
    shell_exec('cp -R /opt/python-openzwave/zwcfg_*.xml ' . dirname(__FILE__) . '/../data');
    shell_exec('rm -rf /opt/python-openzwave/xml_backups');
    shell_exec('rm -rf /opt/python-openzwave/zwcfg_*.xml');
    config::save('allowStartDeamon', 0, 'openzwave');
    echo 'Stop zwave network...';
    openzwave::stop();
    openzwave::stopDeamon();
    echo "OK\n";
    echo 'Stop cron...';
    $cron = cron::byClassAndFunction('openzwave', 'pull');
    if (is_object($cron)) {
        $cron->remove();
    }
    echo "OK\n";
    echo 'Check zwave system...';
    if (count(eqLogic::byType('zwave')) > 0) {
        log::add('openzwave', 'error', 'Attention vous etes sur la nouvelle version d\'openzwave, des actions de votre part sont necessaire merci d\'aller voir https://jeedom.fr/blog/?p=1576');
    }
    if (config::byKey('port', 'openzwave', 'none') != 'none') {
        if (method_exists('openzwave', 'getVersion')) {
            if (version_compare(config::byKey('openzwave_version', 'openzwave'), openzwave::getVersion('openzwave'), '>')) {
                if (jeedom::getHardwareName() == 'Jeedomboard') {
                    openzwave::updateOpenzwave(false);
                } else {
                    log::add('openzwave', 'error', __('Attention votre version d\'openzwave est dépassée sur le démon local, il faut ABSOLUMENT la mettre à jour', __FILE__));
                }
            }
        }
    }
    if (config::byKey('jeeNetwork::mode') == 'master') {
        foreach (jeeNetwork::byPlugin('openzwave') as $jeeNetwork) {
            try {
                if ($jeeNetwork->configByKey('port', 'openzwave', 'none') != 'none') {
                    if (version_compare($jeeNetwork->sendRawRequest('getVersion', array('plugin' => 'openzwave', 'module' => 'openzwave')), openzwave::getVersion('openzwave'), '>')) {
                        log::add('openzwave', 'error', __('Attention votre version d\'openzwave est dépassée sur', __FILE__) . ' ' . $jeeNetwork->getName() . ' ' . __('il faut ABSOLUMENT la mettre à jour', __FILE__));
                    }
                }
            } catch (Exception $e) {
            }
        }
    }
    echo "OK\n";
    echo 'Redemarrage zwave network...';
    try {
        config::save('allowStartDeamon', 1, 'openzwave');
        openzwave::runDeamon();
    } catch (Exception $e) {
    }
    echo "OK\n";
}
開發者ID:kaneda-fr,項目名稱:plugin-openzwave,代碼行數:57,代碼來源:install.php

示例7: indexAction

 public function indexAction()
 {
     try {
         echo "\r\n <br /> hello, i'm indexAction in controller_index, nice 2 meet u! <br />\r\n ";
         echo "\r\n <br /> now set language to zh-cn! <br />\r\n ";
         i18n::setLanguage('en-us');
         echo "\r\n <br /> in english, my name is: " . i18n::get('author') . " <br />\r\n ";
         echo "\r\n <br /> now set language to zh-cn! <br />\r\n ";
         i18n::setLanguage('zh-cn');
         echo "\r\n <br /> in chinese, my name is: " . i18n::get('author') . " <br />\r\n ";
         $mDemo = new model_demo();
         $uin = 10000;
         $uinfo = $mDemo->getUserInfo($uin);
         $uinfo2 = $mDemo->getUserInfo2($uin);
         $update = $mDemo->updateInfo(6, 1);
         var_dump($uinfo, $uinfo2, $update);
         $confs = array('title' => 'page title', 'time' => date('Ymd H:i:s'), 'name' => 'ricolau');
         log::add('error', 'im test~!');
     } catch (exception_i18n $e) {
         //i18n 的異常,一般是由於語言包不存在
         $code = $e->getCode();
         if ($code == exception_i18n::type_language_not_exist) {
             echo "\r\n <br /> exception: language of " . i18n::getLanguage() . ' not exist!\\r\\n <br />';
         }
         echo $e->getMessage();
     } catch (Exception $e) {
         //如果實在還是有exception,那就捕捉到這裏吧,ignore 忽略處理的話。代碼繼續執行 $this->render(),不會白頁。
         //throw $e;  //如果把這個異常拋上去,當前頁麵就木有了,上層接收到的話自己處理就好了,比如報個異常啥的
         $code = $e->getCode();
         echo $e->getMessage();
     }
     //一般來說 render 這塊兒可以不用 try 和 cache,隻有 template 或 slot 不存在才會有異常而已。
     //但是建議和上麵部分業務代碼的try cache 結構分離,從而可以更好的決定,如果業務數據有問題,頁麵是否還繼續render()
     try {
         //按變量單獨 assign
         $this->assign('uinfo', $uinfo);
         $this->assign('updateresult', $update);
         //批量assign 一個數組可以!
         $this->massign($confs);
         $this->render();
     } catch (exception_render $e) {
         //一般來說這個exception  不會有,模板放好了就行了麽
         $code = $e->getCode();
         if ($code == exception_render::type_tpl_not_exist) {
             echo '\\r\\n <br /> exception: template not exist!\\r\\n <br />';
         } elseif ($code == exception_render::type_slot_not_exist) {
             echo '\\r\\n <br /> exception: template not exist!\\r\\n <br />';
         }
         echo $e->getMessage();
     }
     // equals to $this->render('index', 'index');
     return;
     //絕對不要用 exit!!!!!
 }
開發者ID:gavinjx,項目名稱:autophp,代碼行數:54,代碼來源:index2.php

示例8: getDisplayIds

 public static function getDisplayIds($pebbleId)
 {
     $displayIds = '';
     foreach (eqLogic::byType('jebble') as $jebble) {
         if ($jebble->getIsEnable() && $jebble->getId() == $pebbleId) {
             $displayIds = $jebble->getConfiguration('display_ids');
             log::add('jebble', 'debug', 'ids:' . $displayIds);
             break;
         }
     }
     return $displayIds;
 }
開發者ID:edouardkleinhans,項目名稱:jebble_jeedom,代碼行數:12,代碼來源:jebble_v2.class.php

示例9: cron30

 public static function cron30($_eqlogic_id = null)
 {
     if ($_eqlogic_id !== null) {
         $eqLogics = array(eqLogic::byId($_eqlogic_id));
     } else {
         $eqLogics = eqLogic::byType('wazeintime');
         sleep(rand(0, 120));
     }
     foreach ($eqLogics as $wazeintime) {
         if ($wazeintime->getIsEnable() == 1) {
             try {
                 $start = $wazeintime->getPosition('start');
                 $end = $wazeintime->getPosition('end');
                 $row = $wazeintime->getConfiguration('NOA') ? '' : 'row-';
                 $wazeRouteurl = 'https://www.waze.com/' . $row . 'RoutingManager/routingRequest?from=x%3A' . $start['lon'] . '+y%3A' . $start['lat'] . '&to=x%3A' . $end['lon'] . '+y%3A' . $end['lat'] . '&at=0&returnJSON=true&returnGeometries=true&returnInstructions=true&timeout=60000&nPaths=3&options=AVOID_TRAILS%3At';
                 $request_http = new com_http($wazeRouteurl);
                 $request_http->setUserAgent('User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0');
                 $json = json_decode($request_http->exec(6, 2), true);
                 if (isset($json['error'])) {
                     throw new Exception($json['error']);
                 }
                 $data = self::extractInfo($json);
                 $wazeRoutereturl = 'https://www.waze.com/' . $row . 'RoutingManager/routingRequest?from=x%3A' . $end['lon'] . '+y%3A' . $end['lat'] . '&to=x%3A' . $start['lon'] . '+y%3A' . $start['lat'] . '&at=0&returnJSON=true&returnGeometries=true&returnInstructions=true&timeout=60000&nPaths=3&options=AVOID_TRAILS%3At';
                 $request_http = new com_http($wazeRoutereturl);
                 $request_http->setUserAgent('User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0');
                 $json = json_decode($request_http->exec(6, 2), true);
                 if (isset($json['error'])) {
                     throw new Exception($json['error']);
                 }
                 $data = array_merge($data, self::extractInfo($json, 'ret'));
                 log::add('wazeintime', 'debug', 'Data : ' . print_r($data, true));
                 foreach ($wazeintime->getCmd('info') as $cmd) {
                     if ($cmd->getLogicalId() == 'lastrefresh') {
                         $cmd->event(date('H:i'));
                         continue;
                     }
                     if (!isset($data[$cmd->getLogicalId()])) {
                         continue;
                     }
                     if ($cmd->formatValue($data[$cmd->getLogicalId()]) != $cmd->execCmd()) {
                         $cmd->setCollectDate('');
                         $cmd->event($data[$cmd->getLogicalId()]);
                     }
                 }
                 $wazeintime->refreshWidget();
             } catch (Exception $e) {
                 log::add('wazeintime', 'error', $e->getMessage());
             }
         }
     }
 }
開發者ID:jeedom,項目名稱:plugin-wazeintime,代碼行數:51,代碼來源:wazeintime.class.php

示例10: gCalendar_remove

function gCalendar_remove()
{
    $cron = cron::byClassAndFunction('gCalendar', 'pull');
    if (is_object($cron)) {
        $cron->remove();
    }
    // supprimer les fichiers cache et le répertoire //
    array_map('unlink', glob(GCALENDAR_CACHE_PATH . "gCalendar_*.tmp.xml"));
    if (rmdir(GCALENDAR_CACHE_PATH) === true) {
        log::add('gCalendar', 'info', 'gCalendar_remove(): Le répertoire (' . GCALENDAR_CACHE_PATH . ') et ses fichiers ont correctement été supprimés.');
    } else {
        log::add('gCalendar', 'error', 'gCalendar_remove(): Impossible de supprimer le répertoire: ' . GCALENDAR_CACHE_PATH);
    }
}
開發者ID:Masterfion,項目名稱:plugin-gCalendar,代碼行數:14,代碼來源:install.php

示例11: cron

 public static function cron()
 {
     $now = date('Y-m-d H:i:s', strtotime('-1 second', strtotime(date('Y-m-d H:i:s'))));
     $lastDatetime = cache::byKey('sarah::lastRetrievalInternalEvent', $now);
     foreach (internalEvent::getNewInternalEvent('sarah') as $internalEvent) {
         if (in_array($internalEvent->getEvent(), array('update::interactQuery'))) {
             foreach (sarah::byType('sarah') as $sarah) {
                 if ($sarah->ping()) {
                     log::add('sarah', 'info', 'Mise à jour de la grammaire de Sarah');
                     $sarah->updateSrvSarah();
                 } else {
                     cache::save('sarah::lastRetrievalInternalEvent', $lastDatetime, 0);
                 }
             }
         }
     }
 }
開發者ID:Wators,項目名稱:jeedom_plugins,代碼行數:17,代碼來源:sarah.class.php

示例12: failed

 public static function failed()
 {
     $connection = connection::byIp(getClientIp());
     if (!is_object($connection)) {
         $connection = new connection();
         $connection->setIp(getClientIp());
     }
     $connection->setFailure($connection->getFailure() + 1);
     $connection->setStatus('Failed');
     if ($connection->getFailure() > config::byKey('security::retry') && strtotime($connection->getDatetime()) + 60 * config::byKey('security::backlogtime') > strtotime('now') && !$connection->isProtect()) {
         $connection->setStatus('Ban');
         log::add('connection', 'error', __('Attention tentative d\'intrusion détectée venant de l\'IP : ', __FILE__) . $connection->getIp());
     }
     try {
         $connection->save();
     } catch (Exception $e) {
     }
 }
開發者ID:GaelGRIFFON,項目名稱:core,代碼行數:18,代碼來源:connection.class.php

示例13: cron

 public static function cron($_eqlogic_id = null, $force = false)
 {
     if ($_eqlogic_id !== null) {
         $eqLogics = array(eqLogic::byId($_eqlogic_id));
     } else {
         $eqLogics = eqLogic::byType('trains');
     }
     foreach ($eqLogics as $trains) {
         if ($trains->getIsEnable() == 1) {
             if ($force || date('Hi', time()) >= $trains->getConfiguration('trains_maj_deb') && date('Hi', time()) <= $trains->getConfiguration('trains_maj_fin')) {
                 log::add('trains', 'debug', 'Pull ' . ($force ? 'Forcé' : 'Cron') . ' pour trains ');
                 $baseUrl = 'http://www.gares-sncf.com/fr/train-times/departure/' . $trains->getConfiguration('trains_depart') . '/gl';
                 $arrivee = $trains->getConfiguration('trains_arrivee');
                 $response = file_get_contents($baseUrl);
                 $json = json_decode($response, true);
                 $departs = [];
                 foreach ($json['trains'] as $depart) {
                     $trainCourant = (object) [];
                     if ($arrivee == '' || $trains->string_contains($depart['origdest'], $arrivee)) {
                         $trainCourant->dest = $depart['origdest'];
                         $trainCourant->type = $depart['type'];
                         $trainCourant->voie = $depart['voie'];
                         $trainCourant->heure = $depart['heure'];
                         $trainCourant->etat = $depart['etat'];
                         $trainCourant->retard = $depart['retard'];
                         $trainCourant->infos = $depart['infos'];
                         $departs[] = $trainCourant;
                     }
                 }
                 log::add('trains', 'debug', 'Date de mise à jour des infos récupérées : ' . $json['updated']);
                 log::add('trains', 'debug', 'infos récupérées : ' . json_encode($departs));
                 $result = (object) [];
                 $result->updated = $json['updated'];
                 $result->departs = $departs;
                 $trainsCmd = $trains->getCmd(null, 'Departs');
                 if (is_object($trainsCmd)) {
                     $trainsCmd->event(json_encode($result));
                 }
                 $trains->refreshWidget();
             }
         }
     }
 }
開發者ID:bemar,項目名稱:jeedom_trains,代碼行數:43,代碼來源:trains.class.php

示例14: cron

 public static function cron()
 {
     foreach (self::byType('networks') as $networks) {
         $autorefresh = $networks->getConfiguration('autorefresh');
         if ($networks->getIsEnable() == 1 && $autorefresh != '') {
             try {
                 $c = new Cron\CronExpression($autorefresh, new Cron\FieldFactory());
                 if ($c->isDue()) {
                     try {
                         $networks->ping();
                     } catch (Exception $exc) {
                         log::add('networks', 'error', __('Erreur pour ', __FILE__) . $networks->getHumanName() . ' : ' . $exc->getMessage());
                     }
                 }
             } catch (Exception $exc) {
                 log::add('networks', 'error', __('Expression cron non valide pour ', __FILE__) . $networks->getHumanName() . ' : ' . $autorefresh);
             }
         }
     }
 }
開發者ID:eliovir,項目名稱:plugin-networks,代碼行數:20,代碼來源:networks.class.php

示例15: openzwave_update

function openzwave_update()
{
    if (!file_exists(dirname(__FILE__) . '/../data')) {
        mkdir(dirname(__FILE__) . '/../data');
        if (file_exists('/opt/python-openzwave/xml_backups')) {
            shell_exec('cp -R /opt/python-openzwave/xml_backups ' . dirname(__FILE__) . '/../data');
            shell_exec('cp -R /opt/python-openzwave/zwcfg_*.xml ' . dirname(__FILE__) . '/../data');
            shell_exec('rm -rf /opt/python-openzwave/xml_backups');
            shell_exec('rm -rf /opt/python-openzwave/zwcfg_*.xml');
        }
    }
    $cron = cron::byClassAndFunction('openzwave', 'pull');
    if (is_object($cron)) {
        $cron->remove();
    }
    if (count(eqLogic::byType('zwave')) > 0) {
        log::add('openzwave', 'error', 'Attention vous etes sur la nouvelle version d\'openzwave, des actions de votre part sont necessaire merci d\'aller voir https://jeedom.fr/blog/?p=1576');
    }
    openzwave::syncconfOpenzwave();
}
開發者ID:sfrias,項目名稱:plugin-openzwave,代碼行數:20,代碼來源:install.php


注:本文中的log::add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。