From a developer perspective, write line is a great tool to check the output pane and understand what is happening. But why have write line and log message if they do the same? Ideally write line is simply the output pane version of message box. Otherwise don’t write line and log message do the same in terms of writing logs? For write line, I’d prefer not to have logs.
Log Message allows you to log at different information levels. Say for example you have a sequence that checks if an excel sheet is blank, you can log that it is empty under an Error level. If it isn’t blank, you can log that at an information level.
Write Line only allows you to log at an information level.
It is all personal perspectives and experience, I personally use Log Messages over Write Lines as I can log at different levels. If something in a set of data isn’t as expected, I can log this as a warning. If an exception occurs and a sequence goes into the retry part of a TryCatch, I can log this as an error before it retries.
From a debug lense and more so for sensitive data; if I want to be able to see a string without logging it anywhere in output pane, what’s the current best practice? Aside from message box, marking write line or log as private still logs at trace level correct?
I believe that using a log message or write line as private will still write at trace level. The only other way I can think of checking variables without logging them is through the locals panel in debug runs, but running in debug contantly isn’t efficient.
If you wanted to, you could change a certain amount of characters in a string to a symbol or an asterisk, so there is still some form of protection of sensitive data. I have not done something like this personally, but I am sure there are other forum posts that may assist you in this. See this link for replacing all characters in a string aside from the first and last: