PHP code example of aoyagikouhei / fluent-accesslog

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

    

aoyagikouhei / fluent-accesslog example snippets

 bash
$ php composer.phar install
 php
$log = new \Fluent\Accesslog(array('host' => 'localhost'));
$log->add();
$log->add(array('param1' => 'abc'));
$log->add(array('param1' => 'abc'), 'prefix', 'postfix');
 php
$log = new \Fluent\Accesslog(array(
    'tag' => 'mongo.accesslog'
    ,'tag_with_date' => 'Ym'
    ,'mask' => ['password']
    ,'server' => ['REMOTE_ADDR' => 'i']
));
$log->add(array('id' => $_SESSION['member_id']));