我想在SF2项目中使用"Monolog - > GelfHandler".所以我已经将以下内容添加到我的composer.json中:
"graylog2/gelf-php": "dev-master"
Run Code Online (Sandbox Code Playgroud)
我的SF2 config.yml:
monolog:
handlers:
main:
type: gelf
publisher:
hostname: %Graylog2.Host%
port: %Graylog2.Port%
level: info
formatter: monolog.formatter.session_request
Run Code Online (Sandbox Code Playgroud)
但是现在,如果我想记录某些内容,我在GelfHandler :: write()中收到错误
Gelf\Publisher::publish() must be an instance of Gelf\MessageInterface, string given
Run Code Online (Sandbox Code Playgroud)
这有什么不对?