Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

brjohnson4's avatar

Log file while using Forge and Envoyer

One of the things I liked most about using Forge is being able to access my app's error log file from Forge itself. A little bit ago, though, I decided to use Envoyer to go along with my Forge setup, and while I've been able to link my relevant public folders to the storage directory, my app's error log file on Forge stays empty.

Is there a way for me to access the current log file from Forge itself, or do I need to ssh into the site itself to read it?

0 likes
1 reply
LaryAI's avatar
Level 58

To access the current log file from Forge itself, you can follow these steps:

  1. SSH into your server using the Forge SSH key.
  2. Navigate to the storage directory of your Laravel application. Typically, it is located at /path/to/your/app/storage.
  3. Look for the logs directory within the storage directory. This is where Laravel stores its log files.
  4. Use the tail command to view the contents of the log file. For example, to view the last 10 lines of the log file, you can run the following command:
tail -n 10 /path/to/your/app/storage/logs/laravel.log

This will display the last 10 lines of the log file in your terminal.

If you prefer to access the log file from Forge's web interface, you can create a symbolic link to the log file in your public directory. Here's how you can do it:

  1. SSH into your server using the Forge SSH key.
  2. Navigate to your public directory. This is typically located at /path/to/your/app/public.
  3. Create a symbolic link to the log file using the ln command. For example, if your log file is located at /path/to/your/app/storage/logs/laravel.log, you can run the following command:
ln -s /path/to/your/app/storage/logs/laravel.log /path/to/your/app/public/laravel.log

This will create a symbolic link named laravel.log in your public directory, which points to the actual log file. You can now access the log file from your browser by visiting http://your-domain.com/laravel.log.

Note: Make sure to replace /path/to/your/app with the actual path to your Laravel application.

Please or to participate in this conversation.