ログ

アクション

 public function executeIndex(sfWebRequest $request)
 {
    $this->logMessage('ログです');
    $this->logMessage('エラーです','err');
 }

テンプレート

 <html><?php use_helper('Debug') ?>
 <?php log_message('エラーです', 'err') ?></html>

ヘルパー

 sfContext::getInstance()->getLogger()->err('エラーです'); 

デフォルトのロギング設定 (frontend/config/logging.yml)

 prod:
   logger:
     param:
       level: err

参考

http://www.symfony-project.org/gentle-introduction/1_4/ja/16-Application-Management-Tools


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS

Last-modified: 2011-02-22 (火) 18:29:07