var _write = process.stdout.write
process.stdout.write = function(data) {
// do whatever
_write.apply(process.stdout, arguments)
}
I believe, that's about it. It shouldn't affect performance at all unless you're doing something silly in the write method.
Also, you can fork node.js and catch the output of the child, and it's more flexible and less likely to break in the future versions (probably at the cost of a performance hit).
15.10.2013, 18:34, "Ivan" <[email protected]>:
--Hi,
We are working on a logging system running on a paas platform, the aim for the system is to intercept all the messages from the stdout & stderr for the running node.js applications and forward to a third-party system.
One possible is to override those methods in the console instance, so, except this, are there other better ways for this ?
Thanks.--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
