1.0.1 • Published 4 years ago

@pinnacleit/graylog-transport v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Configurable graylog Transport

npm install --save @pinnacleit/graylog-transport

For using graylog Transport With Winston Logger. You need To Import GreaylogHttpTransport class and pass object of this class to winston configuration.

const logger = winston.createLogger({
    transports: [
      new GreyLogHttpTransport({ 
          handleExceptions:true, 
          exitOnError:false,
          graylog : { 
              server :'127.1.1.0',
              port : 12201
            },
          staticMeta : {
              hostname : 'Mera-Neta'
          }
        }),
    ]
  });
  • we can pass Configuration object to GreyLogHttpTransport class

Options

  • handleException - To handle System Level and User Thrown Errors In Node runtime (default | false)
  • graylog : Object With Server IP and PORT and Path (Defaults server : 127.0.0.1 | port: 12201 | path : gelf )
  • staticMeta : Object with hostname value (default '' | Note : please provide name of instance e.g MERANETA_STAGING , MN_001 etc)