PHP code example of giolaza / logger

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

    

giolaza / logger example snippets


define('GIOLAZA_SHOW_ERRORS', false);
define('GIOLAZA_SAVE_ERRORS', true);
define('GIOLAZA_LOGS_FOLDER', __DIR__ . '/../___productionLogs');

GioLaza\Logger\Log::logError(text: 'ANY TEXT',filename: 'filename.log', engineForceStop: true, dispalyErrors: true)

GioLaza\Logger\Log::logError(text: 'DB connection error ',filename: 'db.log')

GioLaza\Logger\Log::logError(text: 'DB connection error ',filename: 'db.log',engineForceStop: true, dispalyErrors: false)

GioLaza\Logger\Log::logError(text: 'User id: 12 ',filename: 'db.log',engineForceStop: true, dispalyErrors: false)