Skip to content

Winston wrapper for formatted logging requests via Koa or generic app

License

Notifications You must be signed in to change notification settings

zillow-oc/sawyer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sawyer

##Define Sys Logs

var sawyer = require('sawyer')({
  syslogEnvs: ['staging', 'production'], // default
  syslog:{
    host: 'mydnshere',
    port: '1234',
    protocol: 'udp4',
    app_name: 'myapp',
    json: true
  }
});

If for some reason you need to close the socket opened by syslog. (You may need to do this in order for the process to exit.) You can use the returned instance of sawyer to so.

// using the instance from above
sawyer.transports.syslog.close();

Doing this will make sure the message queue is emptied before closing the socket.

About

Winston wrapper for formatted logging requests via Koa or generic app

Resources

License

Stars

Watchers

Forks

Packages

No packages published