@restorando/winston-tcp-graylog

阅读时长 6 分钟读完

graylog support for winston based on gelf-pro

winston-tcp-graylog

A graylog2 transport for winston based on the node-gelf-pro library. Support TCP and UPD protocol.

Example

-- -------------------- ---- -------
------ ------- ---- ---------
------ ----------------- ---- --------

--- ------- - -
  -------- -
    ------------ ------
    --------------- -
      ----- ------------
      ----- -----
    -
  -
-

--- -------- - --- --------------------------------------
--- -------- - --- ----------------------------

--- ------ - --- ----------------
  ----------- - --------- -------- -
--

------
  ------------ --- -- -
    -- -------- ------- --------
    ---------------------- -- ----
  --
  -------------- ----------- ------ ---- ----- -- -
    -- ---- ------- ----------
    ----------------------- -- --------------- ------ ---- -----
  --

--------
  ------------ --- -- -
    -- -------- ----------------- --------
    -------------------------- -- ----
  --
  ----------- ----- ---- -- -
    -- ---- ----------------- ---------
    ------------------------ -- ---- ----
  --
  ----------- ---- -- -
    -- ---- ----------------- ---------
    ------------------------ -- -----
  --

------------------ - ----- ---- ---- ---- ---- --- --
--------------- - -- - -- - ---- --- -- --- - -- - -- ------ --- -------------
------------------ --------- ------- -
  ---- ----- ----
  ---- ---- ----
  ---- ---- -----

Config

  • name: Transport name
  • level: 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-doc
  • gelfPro: See gelfPro-doc or my-jjv-schema
  • baseMsg: 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

纠错
反馈