Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var amazon = require('awssum/lib/amazon/amazon'); | ||
|
||
exports = module.exports = { | ||
accessKeyId : '1234567890abcdefghil', | ||
secretAccessKey : '1234567890abcdefghil1234567890abcdefghil', | ||
awsAccountId : '1234-1234-1234', | ||
domainName : 'log', | ||
region : amazon.US_EAST_1, | ||
itemName : 'uuid', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var winston = require('winston'); | ||
var SimpleDB = require('../winston-simpledb').SimpleDB; | ||
var options = require('./options'); | ||
|
||
// Copy the options.js.example file in this directory, name it options.js | ||
// and add in your AWS credentials. | ||
winston.add(winston.transports.SimpleDB, options ); | ||
|
||
// do an info log | ||
winston.log('info', 'Hello distributed log files!', function() { | ||
console.log('First message logged'); | ||
}); | ||
|
||
// do another info log | ||
winston.info('Hello again distributed logs', function() { | ||
console.log('Second message logged'); | ||
}); | ||
|
||
// log with metadata | ||
winston.info('With some metadata', { tag : 'cloud' }, function() { | ||
console.log('Third message logged'); | ||
}); |