Php 灰色2带符号2(独白)

Php 灰色2带符号2(独白),php,symfony,monolog,graylog2,Php,Symfony,Monolog,Graylog2,我想在SF2项目中使用“Monolog->GelfHandler”。因此,我在composer.json中添加了以下内容: "graylog2/gelf-php": "dev-master" 我的SF2 config.yml: monolog: handlers: main: type: gelf publisher: hostname: %Graylog2.Host%

我想在SF2项目中使用“Monolog->GelfHandler”。因此,我在composer.json中添加了以下内容:

"graylog2/gelf-php": "dev-master"
我的SF2 config.yml:

monolog:
    handlers:
        main:
            type: gelf
            publisher:
                hostname: %Graylog2.Host%
                port: %Graylog2.Port%
            level: info
            formatter: monolog.formatter.session_request
但是现在,如果我想记录一些东西,我会在GelfHandler::write()中得到一个错误


这里怎么了

好的,我会自己回答我的问题。更改“格式化程序”失败,或者必须使用Monolog\formatter\GelfMessageFormatter中的格式化程序is子类


thx@all

您具体的symfony版本是什么?或者更好的是,您可以粘贴从
composer show--installed
获得的输出吗?嗨,太好了!也许您还可以添加最终配置,使所有内容都就绪?谢谢
Gelf\Publisher::publish() must be an instance of Gelf\MessageInterface, string given