2017 © Pedro Peláez
 

library monolog-gdpr

Some Monolog processors that will help in relation to the security requirements under GDPR.

image

egeniq/monolog-gdpr

Some Monolog processors that will help in relation to the security requirements under GDPR.

  • Wednesday, May 16, 2018
  • by egeniq
  • Repository
  • 1 Watchers
  • 35 Stars
  • 587 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 499 % Grown

The README.md

monolog-gdpr

Some Monolog processors that will help in relation to the security requirements under GDPR. These processors will replace data with their SHA-1 equivalent, allowing you still to search logs, (*1)

WARNING: These processors will json serialise your $context. This may cause some undesired side-effects., (*2)

Installation

Install the latest version with, (*3)

$ composer require egeniq/monolog-gdpr

Salted hashes

This library supports salted hashes using processor->setSalt(<salt>). To compute your hashed value you could use the following bash command:, (*4)

$ echo -n 'foo@bar.com<YourSalt>' | openssl sha1

RedactEmailProcessor

Replaces all e-mail addresses by their SHA-1 hash., (*5)

Usage:, (*6)

<?php

use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Egeniq\Monolog\Gdpr\Processor\RedactEmailProcessor;

$log = new Logger('name');
$log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING));

$processor = new RedactEmailProcessor();
// optionally you may configure a salt:
$processor->setSalt('h@tsefl@ts!');
$log->pushProcessor($processor);

$log->log(Logger::DEBUG, 'This is a test for foo@bar.com', ['foo' => ['bar' => 'foo@bar.com']]);

RedactIpProcessor

Replaces all ipv4 addresses by their SHA-1 hash., (*7)

Usage:, (*8)

<?php

use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Egeniq\Monolog\Gdpr\Processor\RedactIpProcessor;

$log = new Logger('name');
$log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING));

$processor = new RedactIpProcessor();

// optionally you may configure a salt:
$processor->setSalt('h@tsefl@ts!');
$log->pushProcessor($processor);

$log->log(Logger::DEBUG, 'This is a test for 127.0.0.1', ['foo' => ['bar' => '127.0.0.1']]);

License

Package is licensed under the MIT License - see the LICENSE file for details, (*9)

The Versions

16/05 2018

dev-develop

dev-develop https://github.com/egeniq/monolog-gdpr

Some Monolog processors that will help in relation to the security requirements under GDPR.

  Sources   Download

MIT

The Requires

 

The Development Requires

logger log monolog processor avg gdpr

16/05 2018

dev-master

9999999-dev https://github.com/egeniq/monolog-gdpr

Some Monolog processors that will help in relation to the security requirements under GDPR.

  Sources   Download

MIT

The Requires

 

The Development Requires

logger log monolog processor avg gdpr

16/05 2018

1.0.0

1.0.0.0 https://github.com/egeniq/monolog-gdpr

Some Monolog processors that will help in relation to the security requirements under GDPR.

  Sources   Download

MIT

The Requires

 

The Development Requires

logger log monolog processor avg gdpr