1
私のSymfony 3.4では、私はカスタムロガーを設定したアプリケーション: Monolog not logging context
monolog:
handlers:
my_channel:
level: debug
type: stream
path: '%kernel.logs_dir%/my_channel.log'
max_files: 10
channels: [my_channel]
私はチャンネル「my_channel」と正しく注入されている私のコードで、このロガーを使用し
。画面で$this->logger->error('error message', $data = ['my context here']);
私が正しく表示$データ情報を取得:
09:00:08 ERROR [my_channel] error message ["my context here"]
が、私のログにコンテキストが空ではない:
09:00:08 ERROR [my_channel] error message []
質問:どのように私はログインすることができます私のログファイルのコンテキストも?