hostme/request-id-bundle

在所有请求中包含一个关联标识符。

安装数量: 10,805

依赖项: 0

建议者: 0

安全性: 0

星标: 3

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

v1.1.1 2023-03-15 14:29 UTC

This package is auto-updated.

Last update: 2024-09-15 18:11:43 UTC


README文件

config/bundles.php中添加

<?php
    // ...
    HostMe\RequestIdBundle\RequestIdBundle::class => ['all' => true],

packages/request_id.yaml中配置

request_id:
  enable: true # default: true
  enable_monolog: true # default: true
  trust_request_header: true # default: true
  response_header: X-Request-Id

monolog.yaml中注册monolog格式化器

monolog:
    handlers:
        main:
            ...
            formatter: hostme_request_id.formatter.request_id