Deprecated errors capture

This project is not covered by Drupal’s security advisory policy.

DEPRECATED

Module obsolete, it is better to show the deprecated errors to know what to fix before update to next PHP Version.

INTRODUCTION

This module integrates with the Drupal log and Monolog to move deprecated errors to specific log files, this way if the dblog is enabled it avoids database writing, improving the performance and avoiding polluting the watchdog with deprecated messages.

REQUIREMENTS

INSTALLATION

This module needs to be installed via Composer, which will also download
the required Monolog library and modules. Look at Using Composer with Drupal
for further information.

CONFIGURATION

Quick start

You should create a site specific services.yml (Eg: monolog.services.yml) in the
same folder of your settings.php and then add this line to settings.php itself:

$settings['container_yamls'][] = 'sites/default/monolog.services.yml';

The simplest configuration that allows Monolog to log to a rotating file the deprecated errors might be:

parameters:
  monolog.channel_handlers:
    default:
      handlers:
        - name: 'drupal.dblog'
    log_deprecated_messages_file_log:
      handlers:
        - name: 'log_deprecated_messages.safe_rotating_handler'
          processors: ['log_deprecated_messages.truncate_messages']

It can be enabled or disabled on "/admin/reports/deprecated_logs", also there you can configure the number of
chars for the backtrace on the log.

Look at Monolog module documentation for further information.

How it works

It defines an event subscriber to set a custom handler for deprecation errors, it uses the Monolog extra rotating file system to write on logs.

Supporting organizations: 

Project information

Releases