2

This is a basic question but I'm not sure what the syntax is for passing in the stream option to the arguments in connect logger middleware.

http://senchalabs.github.com/connect/middleware-logger.html

Is it?:

connect.logger('default', myLogger)

And if I wanted to log it to loggly, would I pass in the Loggly object? What interface would it have to implement?

MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460

1 Answers1

2

ok figured it out..

connect.logger(format: 'short', stream:Logger)

And in the Logger object implement a method called "write"

exports.write = (msg) ->
    process.stdout.write msg
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460