docs/examples/custom-logger.js
function adapter (context, payload) {
    var when = payload.when.toString()
    var kind = pad(payload.kind || '-', 8).toUpperCase()
    var type = pad(payload.case || '-', 8).toUpperCase()
    var text = payload.pattern || payload.notice || '-'

    console.log(when, kind, type, text)
  }
function adapter (context, payload) {
    var when = payload.when.toString()
    var kind = pad(payload.kind || '-', 8).toUpperCase()
    var type = pad(payload.case || '-', 8).toUpperCase()
    var text = payload.pattern || payload.notice || '-'

    console.log(when, kind, type, text)
  }
function adapter ( context , payload ) { var when = payload . when . toString ( ) var kind = pad ( payload . kind || '-' , 8 ) . toUpperCase ( ) var type = pad ( payload . case || '-' , 8 ) . toUpperCase ( ) var text = payload . pattern || payload . notice || '-' console . log ( when , kind , type , text ) }
Everything something is logged it calls whatever custom adapter is set. Adapters are passed the current instance of Seneca plus the raw payload.
Everything something is logged it calls whatever custom adapter is set . Adapters are passed the current instance of Seneca plus the raw payload .