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


PHP log::clear方法代码示例

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


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

示例1: dirname

 */
try {
    require_once dirname(__FILE__) . '/../../core/php/core.inc.php';
    include_file('core', 'authentification', 'php');
    if (!isConnect('admin')) {
        throw new Exception(__('401 - Accès non autorisé', __FILE__), -1234);
    }
    if (init('action') == 'all') {
        ajax::success(utils::o2a(update::all(init('filter'))));
    }
    if (init('action') == 'checkAllUpdate') {
        update::checkAllUpdate();
        ajax::success();
    }
    if (init('action') == 'update') {
        log::clear('update');
        $update = update::byId(init('id'));
        if (!is_object($update)) {
            throw new Exception(__('Aucune correspondance pour l\'ID : ' . init('id'), __FILE__));
        }
        try {
            if ($update->getType() != 'core') {
                log::add('update', 'update', __("[START UPDATE]\n", __FILE__));
            }
            $update->doUpdate();
            if ($update->getType() != 'core') {
                log::add('update', 'update', __("[END UPDATE SUCCESS]\n", __FILE__));
            }
        } catch (Exception $e) {
            if ($update->getType() != 'core') {
                log::add('update', 'update', $e->getMessage());
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:update.ajax.php

示例2: update

 public static function update($_mode = '', $_level = -1, $_version = '', $__onlyThisVersion = '')
 {
     log::clear('update');
     $cmd = 'php ' . dirname(__FILE__) . '/../../install/install.php mode=' . $_mode . ' level=' . $_level . ' version=' . $_version . ' onlyThisVersion=' . $__onlyThisVersion;
     $cmd .= ' >> ' . log::getPathToLog('update') . ' 2>&1 &';
     exec($cmd);
 }
开发者ID:GaelGRIFFON,项目名称:core,代码行数:7,代码来源:jeedom.class.php

示例3: Exception

         }
         $jsonrpc = $jeeNetwork->getJsonRpc();
         if (!$jsonrpc->sendRequest('runDeamon', array('plugin' => 'openzwave', 'debug' => init('debug', 0)))) {
             throw new Exception($jsonrpc->getError(), $jsonrpc->getErrorCode());
         }
     } else {
         config::save('allowStartDeamon', 1, 'openzwave');
         $port = config::byKey('port', 'openzwave', 'none');
         if ($port == 'none') {
             ajax::success();
         }
         openzwave::stopDeamon();
         if (openzwave::deamonRunning()) {
             throw new Exception(__('Impossible d\'arrêter le démon', __FILE__));
         }
         log::clear('openzwave');
         openzwave::runDeamon(init('debug', 0));
     }
     ajax::success();
 }
 if (init('action') == 'rewriteNginxAndRestartCron') {
     openzwave::removeNginxRedirection();
     openzwave::listServerZwave();
     $cron = cron::byClassAndFunction('openzwave', 'pull');
     if (is_object($cron)) {
         $cron->stop();
     }
     ajax::success();
 }
 if (init('action') == 'syncEqLogicWithOpenZwave') {
     foreach (openzwave::listServerZwave() as $serverID => $server) {
开发者ID:stef3569,项目名称:plugin-openzwave,代码行数:31,代码来源:openzwave.ajax.php

示例4: init

 if (init('action') == 'changeIncludeState') {
     zwave::changeIncludeState(init('mode'), init('state'), init('serverID'));
     ajax::success();
 }
 if (init('action') == 'showNotification') {
     ajax::success(zwave::showNotification(init('serverID')));
 }
 if (init('action') == 'updateZwayServer') {
     zwave::updateZwayServer(init('version'));
     ajax::success();
 }
 if (init('action') == 'getCommandClassInfo') {
     ajax::success(zwave::getCommandClassInfo(init('class')));
 }
 if (init('action') == 'launchInDebug') {
     log::clear('zwavecmd');
     zwave::restartZwayServer(true);
     ajax::success();
 }
 if (init('action') == 'restartZwayServer') {
     zwave::restartZwayServer();
     ajax::success();
 }
 if (init('action') == 'restartDeamon') {
     $cron = cron::byClassAndFunction('zwave', 'pull');
     if (is_object($cron)) {
         $cron->stop();
     }
     ajax::success();
 }
 if (init('action') == 'autoDetectModule') {
开发者ID:ksoul78,项目名称:plugin-zwave,代码行数:31,代码来源:zwave.ajax.php

示例5: updateSystem

 public static function updateSystem()
 {
     log::clear('update');
     $cmd = 'sudo chown wwww-data:www-data ' . dirname(__FILE__) . '/../../install/update_system.sh;';
     $cmd .= 'sudo chmod +x ' . dirname(__FILE__) . '/../../install/update_system.sh;';
     $cmd .= 'sudo ' . dirname(__FILE__) . '/../../install/update_system.sh';
     $cmd .= ' >> ' . log::getPathToLog('update') . ' 2>&1 &';
     exec($cmd);
 }
开发者ID:saez0pub,项目名称:core,代码行数:9,代码来源:jeedom.class.php

示例6:

     jeedom::restore($uploadfile, true);
     $jsonrpc->makeSuccess('ok');
 }
 if ($jsonrpc->getMethod() == 'jeeNetwork::backup') {
     jeedom::backup(true);
     $jsonrpc->makeSuccess('ok');
 }
 /*             * ************************Log*************************** */
 if ($jsonrpc->getMethod() == 'log::get') {
     $jsonrpc->makeSuccess(log::get($params['log'], $params['start'], $params['nbLine']));
 }
 if ($jsonrpc->getMethod() == 'log::list') {
     $jsonrpc->makeSuccess(log::liste());
 }
 if ($jsonrpc->getMethod() == 'log::empty') {
     $jsonrpc->makeSuccess(log::clear($params['log']));
 }
 if ($jsonrpc->getMethod() == 'log::remove') {
     $jsonrpc->makeSuccess(log::remove($params['log']));
 }
 /*             * ************************Messages*************************** */
 if ($jsonrpc->getMethod() == 'message::removeAll') {
     message::removeAll();
     $jsonrpc->makeSuccess('ok');
 }
 if ($jsonrpc->getMethod() == 'message::all') {
     $jsonrpc->makeSuccess(utils::o2a(message::all()));
 }
 /*             * ************************Interact*************************** */
 if ($jsonrpc->getMethod() == 'interact::tryToReply') {
     $jsonrpc->makeSuccess(interactQuery::tryToReply($params['query']));
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:jeeApi.php

示例7: dirname

 * Jeedom is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
 */
try {
    require_once dirname(__FILE__) . '/../../core/php/core.inc.php';
    include_file('core', 'authentification', 'php');
    if (!isConnect('admin')) {
        throw new Exception(__('401 - Accès non autorisé', __FILE__));
    }
    if (init('action') == 'clear') {
        log::clear(init('logfile'));
        ajax::success();
    }
    if (init('action') == 'remove') {
        log::remove(init('logfile'));
        ajax::success();
    }
    if (init('action') == 'removeAll') {
        log::removeAll();
        ajax::success();
    }
    if (init('action') == 'get') {
        if (init('jeeNetwork_id') != '') {
            $jeeNetwork = jeeNetwork::byId(init('jeeNetwork_id'));
            if (is_object($jeeNetwork)) {
                $jeeNetwork->getLog(init('log'), init('start', 0), init('nbLine', 99999));
开发者ID:GaelGRIFFON,项目名称:core,代码行数:31,代码来源:log.ajax.php


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