Laravel Logs
Laravel is a free, open-source PHP web framework primarily used for building custom web applications in PHP. With Site24x7 AppLogs' native support of Laravel logs, you can simply write your Laravel application log messages to files using Laravel's built-in logging system and track them down using Site24x7. Learn more about log management with Site24x7.
Instructions:
- Log in to your Site24x7 account.
- Download and install the Site24x7 Server Monitoring agent (Windows | Linux).
- Go to Admin > AppLogs > Log Profile and select Add Log Profile.
- Enter the Profile Name.
- For Choose the Log Type, select Laravel Logs from the drop-down list.
- The Pattern and Sample Logs are displayed below. By default, this is the log pattern identified by Site24x7 AppLogs for Laravel logs:
[$Datetime:date$] $Environment$.$Level$: $Message$
This log is separated into fields, each of which will take its respective value and will then be uploaded to Site24x7. - Sample Logs:
[2019-09-04 15:53:15] production.INFO: UPDATE_USER_LOGIN_INFO: User with ID 728 updated to logins=485, last_login=2019-09-04 15:53:15
[2019-09-04 15:53:52] production.INFO: UPDATE_USER_LOGIN_INFO: User with ID 69 updated to logins=156, last_login=2019-09-04 15:53:52
[2019-09-04 17:05:02] production.INFO: HOST_EXIST: FAILED Host in1-smtp does not exist, redirect to public home
- The Pattern and Sample Logs are displayed below. By default, this is the log pattern identified by Site24x7 AppLogs for Laravel logs:
- You can also add a Custom Log Pattern instead of the default one. To do so, click on the pencil icon to edit log type and specify your pattern. Additionally, provide three examples for us to understand and query your custom log pattern.
- Select the Log Source. By default, the below paths are used as file source.
Linux: "/var/www/html/storage/logs/laravel*.log",
"/var/www/*/storage/logs/laravel*.log",
"/var/www/html/*/storage/logs/laravel*.log"
If your source path is different from the default path, specify it while adding the log profile. - You can also associate this log profile with monitors, monitor groups, or corresponding severs. Learn more.
- Click Save.