classdojo / crisco

MIT License
0 stars 0 forks source link

Client should be able to register a plugin that Aux uses for logging purposes #13

Open cdolivares opened 11 years ago

cdolivares commented 11 years ago
c = new require("crisco")({})
FluentDPlugin = require("somefluentdplugin")

c.registerLogger FluentDPlugin

class SomeAction extends BaseAction
  @app.post "/some/action", (CriscoModel, Aux) ->
    Aux.log "In some/action"
   #and
    Aux.error "Something went wrong"
    e = new Error("Something else when wrong")
    Aux.error e

# all Aux.<log|error> calls are now serialized and shuttled off to FluentD