Componette

Componette

mangoweb-backend

mangoweb-backend / monolog-tracy-handler v1.2.0

Integrates Tracy into Monolog, supports uploading Tracy bluescreens to AWS S3

download-cloud-line composer require mangoweb/monolog-tracy-handler

Monolog Tracy Handler

  • Integrates Tracy into Monolog
  • Supports uploading Tracy bluescreens to AWS S3

Installation

composer require mangoweb/monolog-tracy-handler

Usage with Symfony

Install symfony/monolog-bundle and add to config/services.yaml

services:
    Mangoweb\MonologTracyHandler\TracyProcessor:
        tags:
            - { name: monolog.processor }

    Mangoweb\MonologTracyHandler\TracyHandler:
        arguments:
            $localBlueScreenDirectory: '%kernel.logs_dir%'
        tags:
            - { name: monolog.logger }

monolog:
    handlers:
        tracy:
            type: service
            id: Mangoweb\MonologTracyHandler\TracyHandler

You can optionally configure remote storage for Tracy bluescreens.

services:
    Mangoweb\MonologTracyHandler\RemoteStorageDriver:
        class: Mangoweb\MonologTracyHandler\RemoteStorageDrivers\AwsS3RemoteStorageDriver
        arguments:
            $region: '...'
            $bucket: '...'
            $prefix: 'tracy/'
            $accessKeyId: '...'
            $secretKey: '...'

    Mangoweb\MonologTracyHandler\RemoteStorageRequestSender:
        class: Mangoweb\MonologTracyHandler\RemoteStorageRequestSenders\ExecCurlRequestSender

Usage with Nette

Install contributte/monolog and add to app/config/config.neon

extensions:
    monolog: Contributte\Monolog\DI\MonologExtension

monolog:
    channel:
        default:
            processors:
                - Mangoweb\MonologTracyHandler\TracyProcessor

            handlers:
                - Mangoweb\MonologTracyHandler\TracyHandler('%appDir%/../log')

You can optionally configure remote storage for Tracy bluescreens.

services:
    monologTracyStorageDriver:
        type: Mangoweb\MonologTracyHandler\RemoteStorageDriver
        factory: Mangoweb\MonologTracyHandler\RemoteStorageDrivers\AwsS3RemoteStorageDriver
        arguments:
            region: '...'
            bucket: '...'
            prefix: 'tracy/'
            accessKeyId: '...'
            secretKey: '...'

    monologTracyRequestSender:
        type: Mangoweb\MonologTracyHandler\RemoteStorageRequestSender
        factory: Mangoweb\MonologTracyHandler\RemoteStorageRequestSenders\ExecCurlRequestSender
  • v1.2.0 1.2.0

    What's Changed

    New Contributors

    Full Changelog: v1.1.0...v1.2.0

  • v1.1.0 1.1.0

    • adds Monolog 3 support (and therefore requires PHP 8.1+)
  • v1.0.2 1.0.2

  • v1.0.0 v1.0.0

    • supports Monolog 2.x
  • v0.4.0 v0.4.0

    • simplified installation without remote storage
    • added readme with installation and usage instructions
Componette Componette felix@nette.org