1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CakePHP2で$this->log()が使えない時のログ出力

1
Posted at

app/Lib/下の独自クラス内やapp/Vendor/下のサードパーティ製クラス内などからログ出力する時には$this->log()は呼び出せない。
その時は、公式ドキュメント https://book.cakephp.org/2.0/ja/core-libraries/logging.html#writing-to-logs にも書かれている、

CakeLog::write(${出力先ファイル名}, ${出力データ});

を使う。

$this->log(${出力データ}, ${出力先ファイル名})

と引数が逆となる点に注意。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?