PHP code example of tailstream-io / laravel-logger

1. Go to this page and download the library: Download tailstream-io/laravel-logger library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tailstream-io / laravel-logger example snippets


'sampling_rate' => 0.1, // Log 10% of requests

'excluded_paths' => [
    'telescope/*',
    'horizon/*',
    '_ignition/*',
    'health-check',
    'up',
    'favicon.ico',
    '*.css',
    '*.js',
    '*.map',
    'storage/*',
],

'auto_register_middleware' => false,

// bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
    $middleware->append(TailstreamLogger::class);
})
bash
php artisan vendor:publish --tag=tailstream-logger-config
bash
# Check batch status
php artisan tailstream:flush --status

# Manually flush pending logs
php artisan tailstream:flush

# Clear batch without processing
php artisan tailstream:flush --clear