LoginSignup
0
1

More than 1 year has passed since last update.

Laravel Log::infoの使い方 ~ ログ出力

Last updated at Posted at 2022-09-06

動作環境

・PHP: 8.1.10
・Laravel:9.27.0

ファサード

Laravel
use Illuminate\Support\Facades\Log;
use Log; // エイリアスでもいける環境もあるみたいですが、私のは無理でした。

ログの基本

Laravel
Log::info("ログ");
Log::info($request);
Log::info("ログ",['request_log' => $request]);

これでいけます。

出力先はこちら

storage/logs/laravel.log

他にもいろいろできるみたいです。
使用することがあったら追記します。

0
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
0
1