danielduarte / flowed

A fast and reliable flow engine for orchestration and more uses in Node.js, Deno and the browser
https://danielduarte.github.io/flowed
MIT License
151 stars 21 forks source link

Allow to pass some extra namespace to debug. #25

Closed freakpol closed 4 years ago

freakpol commented 4 years ago

It would be convenient to have a way to add an extra namespace to the calls to debug, in order to better filter the logs using the DEBUG variable.

daniel-duarte commented 4 years ago

Added option to run flows with custom debug key (namespaces):

The optional parameter options can include the debug key as follows:

{
  debugKey: 'custom-scope'
}

This parameter can be specified when running flows in any of the forms:

FlowManager.run(flowSpec, params, expectedResults, resolvers, context, options)
FlowManager.runFromString(flowSpec, params, expectedResults, resolvers, context, options)
FlowManager.runFromFile(flowSpec, params, expectedResults, resolvers, context, options)
FlowManager.runFromUrl(flowSpec, params, expectedResults, resolvers, context, options)
daniel-duarte commented 4 years ago

Available in version 1.9.0.