littlelogger v1.0.1
littlelogger
Node.js utility for posting to http://littlelogs.co/
Example
var logger = require('littlelogger')
var log = logger('your-email-secret')
var message = 'Totally using a #nodejs/#npm module (#littlelogger) to post to #littlelogs!'
log.send(message, function (err, info) {
if (err) {
return console.log(err)
}
console.log('sent!')
})API
logger(opts)
A logger constructor is returned via require('littlelogger') and has a single argument opts.
Where opts is an Object with the following properties:
opts.email: your secret email address as provided by littlelogsopts.transport: a Nodemailer supported transport. Defaults to nodemailer-direct-transport.
Optionally you may pass a String as the opts argument as a short-hand for opts.email.
Useful should you wish to use the default nodemailer-direct-transport, or want to set your desired
transport later via logger.createTransport().
logger.createTransport(transport)
Accepts a Nodemailer supported transport as it's first argument transport.
logger.send(message, cb(err, info))
The message argument accepts a String of <= 250 character.
Your callback function cb will be called once the message has been succesfully posted to littlelogs.
Or in the case of an Error your callback function cb will be called, passing err as the first
argument.
License
MIT