Log node option for logging messages: auto-fill with microflow name - Mendix Forum

Log node option for logging messages: auto-fill with microflow name

8

For logging purposes we often use the microflow name as log node. While Mendix Assist does help you to some extent (though faulty, as the name of the module is prefilled without the surrounding ‘ quotes) when adding a log message if would be awesome if we could have it:

The last part is especially useful whenever changes are made to microflow names. It ensures log messages keep referring to the correct microflows and helps the developer with the tedious task of changing all log nodes for the microflow that’s being changed.

I think something similar to what’s being done with associations whenever an entity gets renamed would be really cool to have for log nodes!

asked
2 answers

I like the idea, sometimes the log node naming is not consistent and the log message does not automatically tell you where it went wrong..

Alternatively, add ( an option to include ) the stacktrace to the log message. This would allow not only to determine the affected microflow, but in case of submicroflows might lead to a quicker understanding of the root cause

For example:
INFO - MyLognode: Something went wrong
at Module.SUB_GenerateLogMessage.nested [3 of 5] 
at Module.SUB_LoopSomeData (NestedLoopedMicroflow : '')
at Module.SUB_GenerateList (SubMicroflow : 'SUB_LoopSomeData')
at Module.ACT_ThisMightFail (SubMicroflow : 'SUB_GenerateList')

 

Edit: The stacktrace option is actually already there but doesn't seem to do anything in the modeler, not for info nor for error messages (mx 7.23.12) which is probably why I forgot that it exists

 

Created

I mostly use a constant with the module name as lognode, but sometimes do want to have the microflow name for logging purposes.

It would be nice if the microflow name is available as default variable in microflows so Dennis can use it for his purpose and I can use it in the message description.

Edit: I see some earlier posts for my option 

https://forum.mendix.com/link/ideas/932 

https://forum.mendix.com/link/ideas/1981 

Created