PHP code example of ankane / logstop

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

    

ankane / logstop example snippets


$logger->info('Hi [email protected]!');
# Hi [FILTERED]!

$logger->info('Hi', ['email' => '[email protected]']);
# Hi {"email":"[FILTERED]"}

$logger->pushProcessor(new Logstop\Processor());

new Logstop\Processor(ip: true);

new Logstop\Processor(mac: true);

new Logstop\Processor(
    email: false,
    phone: false,
    creditCard: false,
    ssn: false,
    urlPassword: false
);
sh
git clone https://github.com/ankane/logstop-php.git
cd logstop-php
composer install
composer test