I've read through the docs about logging here Logging : Node-RED where it mentions that there's several log levels. However... I haven't found how I can actually log to these different levels in a function node. What I have observed however is that
node.error() produces error node.log() produces info
but where are the other log levels and how do I produce a log with that level?
Going through console there's no filtering whatsoever, I guess this is what nodered uses under the hood?
With that said though it would probably be a good idea to explicitly state this in the documentation.
Cause to me running Object.keys(someObject) on every framework related object doesn't feel like a good developer experience. I'd be happy to make PR for it but I can't find a documentation repo.
I believe all of the relevant properties of the node object ARE documented. The object.keys trick is just that, a quick and dirty trick do dump the structure of an object.
Actually, it is a pretty decent developer experience for something quick and dirty when you don't want to hunt through the documentation I certainly wouldn't expect anyone to have to do that regularly.
In this case, the logging functions follow a very standard naming convention anyway. And they are indeed documented.