Logクラスは、ログファイルにメッセージを書き込むメソッドを提供する。
ログファイルはconfig.phpのlog_pathで指定したディレクトリ下にYYYY/MM/DD.phpというパスで作成される。
ログの設定はCOREPATH/config/config.php又はAPPPATH/config/config.phpファイルに記述する。また、Configクラスを使用することにより変更することもできる。
| メソッド | 説明 | 
|---|---|
| debug | デバッグレベルのログを出力する。 | 
| error | エラーレベルのログを出力する。 | 
| info | 情報レベルのログを出力する。 | 
| warning | 警告レベルのログを出力する。 | 
| write | 指定したレベルのログを出力する。 | 
デバッグレベルのログを出力する。
static function debug($msg, $method = null)
デバッグレベルのログを出力する例を示す。
Log::debug('foo', __CLASS__);
エラーレベルのログを出力する。
static function error($msg, $method = null)
エラーレベルのログを出力する例を示す。
Log::error('foo', __METHOD__);
情報レベルのログを出力する。
static function info($msg, $method = null)
情報レベルのログを出力する例を示す。
Log::info('foo', __FILE__ . ':' . __LINE__);
警告レベルのログを出力する。
static function warning($msg, $method = null)
警告レベルのログを出力する例を示す。
Log::warning('foo');
指定したレベルのログを出力する。
static function write($level, $msg, $method = null)