Does anyone know a way to write a parameter value like username into the true log on error file? We have a situation where user security settings combined with data driven report options can generate an error, but in looking at the true logs I can't tell which user generated the errors as the username is never returned in the HTML.
I've come up with a stop-gap solution of creating a measure value with the parameter as the name so that the measure start/stop shows up in the log giving me the username. However this has the down-side of including all these basically empty measures in the overview report clogging up the custom timers section of the report making it difficult to get at the data I want there. [img]/images/graemlins/frown.gif[/img]
This is all I could think of:
If the app is using FORMs, then just include a custom field name (like abcdUserName) in the Form(s) and pass the parameter (user name) as the field value there. While running the script, it will generate an Warning "Field name not found" but the script will run fine. Later, in the true log, in "Post data" part you can see which user name was passed.
Other (the quicker) method is of course adding a measure with the parameter as you have already mentioned. To get rid of the measures, you can Remerge the TSD file and exclude the unnecessary timers.
Actually I elected to stick with my original solution of an empty measure at the top of each transaction. I pre-pended the characters ZZ to the measure name so all these measures show at the bottom of the overview report custom timers section. I try to avoid any warning/error messages I can during a test run so as to be able to more easily identify when something does go wrong.
In my case since I'm copying and pasting the relevant counters out to an excel sheet anyway, extra irrelevant measures in the overview report were not an issue.