nikolaus Member Licensed User Longtime User Jul 29, 2014 #1 I am using log () heavily to identify the actual Sub. It would be nice to have an option to disable Log () with one click for the whole project. An checkbox option in the modules tab to enable/disable Log () per Sub would be terrific. Last edited: Jul 29, 2014
I am using log () heavily to identify the actual Sub. It would be nice to have an option to disable Log () with one click for the whole project. An checkbox option in the modules tab to enable/disable Log () per Sub would be terrific.
DonManfred Expert Licensed User Longtime User Jul 29, 2014 #2 You could use a own log-sub instead of using log-command directly. In this sub you do the log and have the ability to use a global variable to en-/disable logs at runtime....
You could use a own log-sub instead of using log-command directly. In this sub you do the log and have the ability to use a global variable to en-/disable logs at runtime....
nikolaus Member Licensed User Longtime User Jul 29, 2014 #3 Good idea, I will do that next time where it fits. However that does not meet my needs. I am using logging to identify the actual Sub: Sub MySub (v As Int) : Log ("MySub: "&v) ... or to log Variables and filewrites during runtime. This helps a lot where the debugger fails, e.g. when the program flow depends on timers and user interaction.
Good idea, I will do that next time where it fits. However that does not meet my needs. I am using logging to identify the actual Sub: Sub MySub (v As Int) : Log ("MySub: "&v) ... or to log Variables and filewrites during runtime. This helps a lot where the debugger fails, e.g. when the program flow depends on timers and user interaction.
MaFu Well-Known Member Licensed User Longtime User Jul 29, 2014 #4 Why not use conditional compilation? B4X: #If LOG_ENABLED Log("...") #End If and then use two build configurations with and without LOG_ENABLED set
Why not use conditional compilation? B4X: #If LOG_ENABLED Log("...") #End If and then use two build configurations with and without LOG_ENABLED set
nikolaus Member Licensed User Longtime User Jul 29, 2014 #5 Why not use conditional compilation? Click to expand... This is in effect the same like Manfreds suggestion. To archieve what I want (see above) I had to double all subs.
Why not use conditional compilation? Click to expand... This is in effect the same like Manfreds suggestion. To archieve what I want (see above) I had to double all subs.