grunt-deployment-logger

1.1.0 • Public • Published

grunt-deployment-logger

Build Status NPM version Dependencies

Provides tasks to log deployment markers to redis. See kibana docs for more info.

['start-deployment', 'end-deployment']

Currently only supports logging to redis. The type option is provided so that you can strongly-type the log messages.

grunt.initConfig({
  'start-deployment': {
    'myproject': {
      options: {
        host: '127.0.0.1',
        port: 6379,
        list: 'logstash',
        type: 'myproject-deployment-message',
        message: 'starting deployment of version 1.2.3',
        env: 'test'
      }
    }
  },
  'end-deployment': {
      'myproject': {
        options: {
          host: '127.0.0.1',
          port: 6379,
          list: 'logstash',
          type: 'myproject-deployment-message',
          message: 'finished deployment of version 1.2.3',
          env: 'prod'
          timestamp: new Date().toISOString() // default timestamp is unix milliseconds, you can override it if you want ISO or something else
        }
      }
    }
});

Sample message output (based on above configuration)

{
  "type": "myproject-deployment-message",
  "action": "start-deploy",
  "message":"starting deployment of version 1.2.3",
  "timestamp": 1399997783542,
  "host": "my.machine.name.local"
},
 
{
  "type": "myproject-deployment-message",
  "action": "end-deploy",
  "message":"finished deployment of version 1.2.3",
  "timestamp": "2014-08-01T12:31:23.345Z",
  "host": "my.machine.name.local"
}

Package Sidebar

Install

npm i grunt-deployment-logger

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • acolchado
  • arnoldzokas
  • matteofigus
  • christriddle
  • ryantomlinson
  • andyroyle
  • stevejhiggs