PHP code example of arispati / laravel-log-s3

1. Go to this page and download the library: Download arispati/laravel-log-s3 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/ */

    

arispati / laravel-log-s3 example snippets




return [
    'disk' => 's3',
    'path' => 'logs',
    'timezone' => 'Asia/Jakarta'
];

use Arispati\LaravelLogS3\Facades\Log;

// create log name
Log::new('new-log');
// enabled to write file
Log::enabled(true);
// logging
Log::debug('Log Start');
// create a timer
Log::timer('log-start');
// logging with timer duration
Log::debugDuration('Log End', 'log-start');
// write to file
Log::write();
bash
php artisan vendor:publish --provider="Arispati\LaravelLogS3\Providers\LaravelLogS3Provider" --tag="config"