2017 © Pedro Peláez
 

library drupal-logger

A watchdog() psr-3 logger for Drupal.

image

mundanity/drupal-logger

A watchdog() psr-3 logger for Drupal.

  • Thursday, December 7, 2017
  • by mundanity
  • Repository
  • 0 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

A simple PSR-3 implementation of a logger for Drupal watchdog calls., (*1)

Details

The PSR-3 parameter $context is passed to watchdog as variables, for use as placeholders., (*2)

class MyClass
{
    public function myMethod($param)
    {
        $this->logger->warning('Param value was @param', ['@param' => $param]);

        return $param;
    }
}

The watch dog type is set as the function or class method that called the logging code. In the example above, the watchdog type is set as MyClass::myMethod., (*3)

Controlling log levels

Log levels below a specified level can be ignored, which may help reduce noise in production systems. When the class is initiated, an optional LogLevel may be provided. Events at or below the provided LogLevel will be ignored. $logger = new WatchdogLogger(LogLevel::NOTICE);, (*4)

// This debug message will be ignored.
$logger->debug('Some debugging information');

By default, no events are ignored., (*5)

The Versions

07/12 2017

dev-master

9999999-dev https://github.com/mundanity/drupal-logger

A watchdog() psr-3 logger for Drupal.

  Sources   Download

MIT

The Requires

 

07/12 2017

v1.1.2

1.1.2.0 https://github.com/mundanity/drupal-logger

A watchdog() psr-3 logger for Drupal.

  Sources   Download

MIT

The Requires

 

17/03 2017

v1.1.1

1.1.1.0 https://github.com/mundanity/drupal-logger

A watchdog() psr-3 logger for Drupal.

  Sources   Download

MIT

The Requires

 

27/08 2015

v1.1.0

1.1.0.0 https://github.com/mundanity/drupal-logger

A watchdog() psr-3 logger for Drupal.

  Sources   Download

MIT

The Requires

 

31/03 2015

v1.0.0

1.0.0.0 https://github.com/mundanity/drupal-logger

A watchdog() psr-3 logger for Drupal.

  Sources   Download

MIT

The Requires

 

The Development Requires