logging - to send logs from php application to graylog using monolog -


i have installed graylog server , dependencies.trying send logs php application graylog server using monolog. not aware of how use gelf handler.i have seen gelfhandlertest.php present inside project monolog not able set publisher , create handler.can please explain me sample code how use it.

trying send logs localhost apache server set in same private network graylog installed.

the testlogging file getting executed in php are,

use monolog\logger; use monolog\handler\streamhandler; use monolog\handler\gelfhandler; use gelf\message; use monolog\formatter\gelfmessageformatter;   $handler = new gelfhandler($publisher); 

how set publisher in monolog?

any sort of appreciated.thanks


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -