Laravel Log

This article covers Laravel’s logging system.

Logging Basics

Laravel provides a powerful logging system.

Configuration

Logs are configured in config/logging.php.

Usage

use Illuminate\Support\Facades\Log;

Log::info('This is an info message');
Log::warning('This is a warning');
Log::error('This is an error');

Log Channels

Laravel supports multiple log channels:

Log::channel('slack')->error('Critical error!');

Viewing Logs

Logs are stored in storage/logs/laravel.log.

Conclusion

Laravel’s logging system helps you track application issues.