Winston transport for crashlog.io.
Winston transport for the crashlog.io service.
Install the module with:
npm install winston-crashlog
To enable logging to Crashlog via winston in express you will need the following modules.
Below is a fragment from an express application illustrating it's configuration along side the console logger, note in this
accessKeySecret are configured outside this code and loaded with
var winston = require'winston';var expressWinston = require'express-winston';var CrashLog = require'winston-crashlog'CrashLog;appuseexpressWinstonerrorLoggertransports:Consolejson:truecolorize:truedebug:true accessKeyId:nconfget'accessKeyId' accessKeySecret:nconfget'accessKeySecret';return app;
I have included a small test program named httptest.js, to use it:
Create a directory in your home called .crashlog then add a file containing the credentials from your crash log project.
exportscreds = 'accessKeyId': 'XXXX' 'accessKeySecret': 'XXX';
Then simply run use node to run the script.
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.
Copyright (c) 2012 Mark Wolfe
Licensed under the MIT license.