Logging data for each Grunt deployment in files
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-logger --save-dev
In your project's Gruntfile, add a section named
logger to the data object passed into
This task will create/append the log file according to log items defined in the logItems section.
Mandatory: A string that represent the path and file, where the log should be written. if no file exists a new file will be created. example: 'log/myLog.log'
Mandatory: Object that holds the items to be added to the log line. only the values of the properties will be added to the log line
so if i want to add a lines like this:
1/1/2000 12:00 project1 test1/1/2000 12:01 project2 test
so the logItems will look like:
logItems:'date': grunttemplate'project': '<%= pkg.name %>''environment': 'test'
A string value that separate between log items.
See the major example above.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
0.1.5 Adding tests