so we can have something like this in Release mode
B4X:
Log($"error in sub ${CURRENTSUB} at ${CURRENTLINE}"$)
Log($"error in sub ${CURRENTSUB} at ${CURRENTLINE}"$)
they may be resolved at compilation time, so there would be no performance impact at run timeLine would probably impact performance, but sub would be nice. And name of module.
On further thought I'm not sure exactly what you have in mind. If CURRENTSUB and CURRENTLINE were resolved at compile time it could only resolve the Sub and line number of the Log statement itself and I can't see a use for that.there would be no performance impact at run time
So you change the line number in all subs every time if you add a new function above?I'm afraid that I don't see any use for that as you can easily put that information in the code yourself as you know what line, Sub and module you are presently coding
Yes, but not massively and programmatically.I'm afraid that I don't see any use for that as you can easily put that information in the code yourself as you know what line, Sub and module you are presently coding.
OK I now see that. You have a point but I just don't see any use for it the way I code so it doesn't tick any boxes for me - but your coding practices are probably different.So you change the line number in all subs every time if you add a new function above?
Let me show you a line from our error logging:but I just don't see any use for it the way I code so it doesn't tick any boxes for me - but your coding practices are probably different.
2022-08-02 16:35:30,324 [1] ERROR - [mycompany.theproject.modFunctions - funcShowWaitIndicator] - [110] Message:Splash Form already shown
That looks amazing.Let me show you a line from our error logging:
You look at it and know directly in which module the error occurred, in which sub and in which code line. So you can start directly at the right place to look for the error and add break points.B4X:2022-08-02 16:35:30,324 [1] ERROR - [mycompany.theproject.modFunctions - funcShowWaitIndicator] - [110] Message:Splash Form already shown
I'm not sure how that is relevant. I'm just discussing the developer experience using B4X.Sender is a runtime object, CURRENTxxx tokens might just be preprocessor macros