Launchpad
Launchpad
Launchpad
  • Introduction
  • General
    • Installation
    • Creating a subscriber
    • Contributing
  • Tutorials
    • Beginner documentation
      • Beginner handbook
        • Creating subscribers
        • Wiring subscribers
        • Installing local environment
        • Adding front-end
        • Building the plugin
      • Plugin life circle
        • Activation
        • Deactivation
        • Uninstall
    • Starting with the framework
    • Migrating to Launchpad
    • Notions
      • Framework concepts
        • Inversion of control
        • Subscribers
        • Dispatcher
      • Good practices
        • Hooks
          • Preventing magic constants
          • Decouple features
          • Sanitize filters output
      • Testing
        • Organize tests
  • CLI
    • Commands
    • Creating a command
  • Testing
    • Unit test
    • Fixtures
    • Integration test
  • Container
    • Architecture
    • Parameters
    • Providers
    • Auto wiring
    • Manual wiring
    • Activation/Deactivation
    • Inflectors
  • Modules
    • Definition
    • Listing
      • Action Scheduler
      • BerlinDB
      • Bus
      • Options
      • Renderer
      • Logger
      • Uninstaller
      • Filesystem
      • Front-end
      • Hook extractor
    • Creating a module
Powered by GitBook
On this page
  • Description
  • Install
  • Structure
  1. Modules
  2. Listing

Logger

Description

This module intent to offer a logging library respecting PSR-3 standard and that you can extend easily.

Install

To install the library run the following command: composer require wp-launchpad/logger-take-off

Structure

On install the module creates new parameters into configs/parameters.php:

 'log_enabled' => false,
 'log_handlers' => [
    \Launchpad\Dependencies\Monolog\MonologHandler::class,  
 ],
 'logger_name' => 'launchpad',
 'log_file_name' => 'launchpad.log',
 'log_path' => '',
 'log_debug_interval' => 0,

Each parameter control a configuration:

  • log_enabled: Enable or disable log.

  • log_handlers: Handlers used in the logger.

  • logger_name: Name from the Monolog logger.

  • log_file_name: Name from the Monolog log file.

  • log_path: Path from the Monolog logger.

  • log_debug_interval: Interval before changing file.

You can easily create your own logger by implementing the LaunchpadLogger\HandlerInterface that follows the PSR-3 standard then add it to the log_handlers confguration.

PreviousRendererNextUninstaller

Last updated 1 year ago