Closed bhawna91 closed 5 years ago
@Nargonath any idea?
@bhawna91 Nope sorry, I haven't been using Good
lately.
What's data.config
in _transform
?
@arb - data.config is the config passed to the events of /user endpoint . The routeConfig above. I am trying to suppress the response events based on this config by using suppressResponseEvent: true
The response event has the config populated -
{event:"response",.......,config:{suppressResponseEvent:true}}
and the expectation is that if
(data.event === 'response' && data.config.suppressResponseEvent === true){return next();}
should be filtering out this event . But it still appears in the log.
@bhawna91 Please, use markdown syntax for code block otherwise it is really hard to read. You can even use syntax identifier to add syntax highlighting: https://help.github.com/articles/creating-and-highlighting-code-blocks/
done.
Do you have any other reporters writing to '/log'
? What you have there should be working.
Yes I have another reporter writing to /log to another file.
That's likely where the extra log entries are coming from.
@bhawna91 Is it working?
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
I created a new npm package for suppressing response event from the log file. The transform function for the stream in the package is -
and is exposed as Filter
This is how I set the suppressResponseEvent config field in server.js file -
In good-options , I am using this filter -
Code runs fine. I was thinking that the response event for the endpoint should not be present in log after these changes, but its still there. The config object is populated properly though in the event. What am I missing?