Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module integrates with Drupal's Monolog module to send logs to Logz.io. It allows you to configure the Logz.io handler through Drupal's configuration system, making it easier to manage your logging settings without directly editing service files.

Ship logs to Logz.io via Monolog. This glue module allows shipping handler provided by the logzio-monolog library to be exposed to the Drupal Monolog module and configured using the Drupal config system.

Features

  1. Registers a monolog.handler.logz service that can be then configured into the monolog service.
  2. Sources handler configuration from the Drupal configuration system under a monolog_logz.settings configuration item.

Due to #2951046: Allow parsing and writing PHP class constants and enums in YAML files, it is not currently possible to configure the logzio-monolog library's handler directly in a Drupal services.yml file as the library specifies PHP Enumerations as arguments and Drupal is not setting the YAML parser flags in a way that allows these typed arguments.

Even if passing enums in a Drupal services.yml were possible, it is a common pattern to configure site-specific values in settings.php or the Drupal config system. Some users may not wish to hard-code their Logz.io token in a *.services.yml file but rather inject it via the environment or a secrets-management system.

Post-Installation

Like the Monolog module, this module does not have any visible user interface and is configured by adding values to the Drupal configuration, usually in settings.php. Additionally you must tell monolog to use it in a monolog.services.yml (or equivalent) file used to configure monolog (as described in the Monolog module's README).

  1. Install this module (and the Monolog module) with composer to ensure you are also getting the logzio-monolog library.
  2. Add your configuration details to your settings.php:
    // Part of the Monolog module setup:
    $settings['container_yamls'][] = 'sites/default/monolog.services.yml';
    
    // Configure the Logz.io shipping handler:
    $config['monolog_logz.settings']['token'] = 'my-logz.io-token';
    $config['monolog_logz.settings']['level'] = 'Debug';
    $config['monolog_logz.settings']['host'] = 'UsEast1';
    
  3. Configure the logz handler provided by this module into the monolog service in a monolog.services.yml:
    parameters:
      monolog.channel_handlers:
        php: ['error_log', 'logz']
        default: ['logz']
    

Additional Requirements

Activity

Total releases
1
First release
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
1.0.1 Stable Feb 17, 2025