Created
July 17, 2014 09:54
-
-
Save nojimage/564981bf35ecf41bca1f to your computer and use it in GitHub Desktop.
Laravelのものぐさログ設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// snip .. | |
// ログのパーミッションはデフォルトで0644なので、cli経由、web経由でファイル名変えとく。 | |
$logFile = PHP_SAPI . '.log'; | |
Log::useFiles(storage_path('logs/debug-' . $logFile)); // こっちは全部のログレベルを書き込むログ | |
Log::useFiles(storage_path('logs/error-' . $logFile), 'warning'); // こっちはwarning以上を書き込むログ |
エラーだけ見たいこともあるかなと、ログ分けてみたけど要らないと思う。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
パーミッション替えようと思うと、Handlerを直接インスタンス化するか、取り出して変更してまた入れてをしないとなので、ファイル名変えちゃう。