ericgj/newman — comment on commit 42da093ab019610f2479729dc694e074c6753842
File: examples/logging.rb line 22
By ericgj:

> Can't see when I'd want to use both of these simultaneously. Do you have a practical example?

Maybe there are better ways to do it, but my thought was you might want to use the log to see which request gets hooked up to which response (i.e. at the end of the processing). If you had them together in the log file it would be easier visually to see and probably to grep as well. This might point instead to ID'ing the requests/responses in some way.

> I don't particularly like the idea of having a single object with two different behaviors based on flags.

Do you think the behavior is different enough to warrant 2 different classes?
What about

1. `Newman::Logger.new(logger, :request) # only logs either request or response`
2. `class Newman::RequestLogger < Newman::Logger`
3. something like

class Newman::RequestLogger
include Newman::Loggable
def call(params)
log_email("REQUEST", params.fetch(:request))
end
end