12 years ago
TestExecute - Disable logging entirely
I've designed some testing tools which run continuously, checking the DB for new scripts to run. In this environment, my log files are getting up above 2 GB. I would like to be able to disable saving log information for TestExecute (not just suppress the information when it exits).
If I remember correctly, I can capture the event for each type of log and check a variable to see if TestExecute is running (rather than TestComplete, which I use on my own comp and need the logging information). I could then (at least in theory), set a variable to true which prevents the log event from firing.
Am I the only one who actually wants to disable logging in TE? I guess I'm in a unique scenario, but it's hard to believe there's no interface option to just disable the log files.
If I remember correctly, I can capture the event for each type of log and check a variable to see if TestExecute is running (rather than TestComplete, which I use on my own comp and need the logging information). I could then (at least in theory), set a variable to true which prevents the log event from firing.
Am I the only one who actually wants to disable logging in TE? I guess I'm in a unique scenario, but it's hard to believe there's no interface option to just disable the log files.
- There is no such options, however it is still possible.
You can create handlers for all log events (it is described in Help) and in every handler write
LogParams.Locked = true;
This will supress posting a certain event (error, warning, message and so on).
You can also use Project Variable to create a boolean variable which will specify whether to disable logging or not. THen your even handlers will look something like this
if(Project.Variable.SupressLog)
{ LogParams.Locked = true; }