graylog support for winston based on gelf-pro
winston-tcp-graylog
npm i -S winston-tcp-graylog winston
A graylog2 transport for winston based on the node-gelf-pro library. Support TCP and UPD protocol.
Example
-- -------------------- ---- ------- ------ ------- ---- --------- ------ ----------------- ---- -------- --- ------- - - -------- - ------------ ------ --------------- - ----- ------------ ----- ----- - - - --- -------- - --- -------------------------------------- --- -------- - --- ---------------------------- --- ------ - --- ---------------- ----------- - --------- -------- - -- ------ ------------ --- -- - -- -------- ------- -------- ---------------------- -- ---- -- -------------- ----------- ------ ---- ----- -- - -- ---- ------- ---------- ----------------------- -- --------------- ------ ---- ----- -- -------- ------------ --- -- - -- -------- ----------------- -------- -------------------------- -- ---- -- ----------- ----- ---- -- - -- ---- ----------------- --------- ------------------------ -- ---- ---- -- ----------- ---- -- - -- ---- ----------------- --------- ------------------------ -- ----- -- ------------------ - ----- ---- ---- ---- ---- --- -- --------------- - -- - -- - ---- --- -- --- - -- - -- ------ --- ------------- ------------------ --------- ------- - ---- ----- ---- ---- ---- ---- ---- ---- -----
Config
name
: Transport namelevel
: Level of messages this transport should log. (default: info)silent
: Boolean flag indicating whether to suppress output. (default: false)handleExceptions
: Boolean flag, whenever to handle uncaught exceptions. (default: false)humanReadableUnhandledException
: Option to get more readable exceptions.formatter
: See winston-docgelfPro
: See gelfPro-doc or my-jjv-schemabaseMsg
: Object containing the default message fields.levelMap
: Object for extending the base levelMap
DefaultConfig
-- -------------------- ---- ------- - ----- ------------- ------- ------ ------ ------- ----------------- ------ -------------------------------- ------ ---------- - -- -- -------- - -------- ------ -- ---- ---- ------- ----------- ------ -- --------------- -- ------- ------- --------- ------ -- ------------ -- ------- ----- ----- -- -------- -- -- ------------- -- -------- - ------------ ------ --------------- - --------- ------- ----- ------------ ----- ----- -- -- --------- - ---------- -- ------ -- ------ -- --------- -- ----- -- ------ -- ---- -- -------- -- ----- -- ------- -- ----- -- ------------ -- ----- -- ---- -- ------ - - -
HomePage
https://github.com/nskazki/winston-tcp-graylog#readme
Repository
git+https://github.com/nskazki/winston-tcp-graylog.git
来源:JavaScript中文网 ,转载请注明来源 https://www.javascriptcn.com/post/6005606b81e8991b448de8f3