Thanks für your reply. But this one are not the hooks I mean.
I mean the GLOBAL ones - for example "onSend" which will be fired on every Send event in all nodes in all flows (if my understanding of the documentation is right) .
Hi ! Thanks for your support. This example describes for me how this hook can be added (and I've tried several of these examples). But what's not clear for me is WHERE to place this "RED.hooks.add" ? I've done it in settings.js (but probably in the wrong section) and so (surely after restarting the server) I'm controlling the Server-Console - but nothing happens.
I would like to log special data of the flows-messages in an a additional log which is not loggable by the standard "node-red" logging options
Probably an additional relevant information : I'm running currently server and client on a WIN10 Environment.
This sounds like a 'problem' solved several times by the means Node-RED already provides - without the need to hook into the core of the runtime. If you provide some more details (e.g.: Which messages? Where shall those be logged to?), I'm convinced we'll be able to show you a way to go...
The beauty of Node-RED lays in the fact that the platform it is running on - in 9 of 10 cases - doesn't matter at all...
Hi. Thanks for your reply. What I like to do are expand severals options - my description of logging was only a small example.
So what I really need is a short description where GLOBAL hooks has to be registered to use this functionality generally and not to a specific flow in a specific node.
Thanks for your qualified answer. That‘s exactly what I’m searching for. Surely I need some time to completly analyze your code, but so I’ll be able to do my first tests. With the hooks.
I think I found a solution last night. It seems that there is an mistake in Node-Red.
The source of my node was placed in an directory on drive „d:......\nodexyz“ The „npm install d:.....“ works fine, but when the node is processed the resolution of the „require(…);“ can not be done and result in the error. After uninstalling the node, moving the subdir of the node to „c:\Users\Name.node-red...“, reinstall it and restart the server was the solution. Right now all modules are loaded and everything works fine. Seems that the sources of nodes can not be located on an other drive !
Thanks for your interest and try to help. Kind Regards.