Ask a Question

TC "Log Message" with "Code Expression"

SOLVED
mooitc
Occasional Contributor

TC "Log Message" with "Code Expression"

Hi,

a log entry with Log.Message works very easy.
...
If (Project.Variables.ExtendedDebug = "true")Then Call Log.Message("Debug: " + Project.Variables.ExtendedDebug + ";" + "ProjectSuite.ConfigPath: " + ProjectSuite.ConfigPath + ";")
...

but if I use Log Message with "Code Expression" then only an empty line appears in the log.

Is this normal or do I have a thinking error?

5 REPLIES 5
rraghvani
Champion Level 3

Works fine in the latest version of TC

rraghvani_0-1669744703157.png

 

mooitc
Occasional Contributor

Hi rraghvani, the log output with "Code Expression" does not work when I want to write the content of the varailbe of type "boolean" to the log.

rraghvani
Champion Level 3

After changing ExtendedDebug from String to Boolean, it still works

rraghvani_0-1669797937431.png

In your Operation Parameters, you've defined Attrib and Picture as Empty? What is Empty?

rraghvani_0-1669798495080.png

mooitc
Occasional Contributor

Hi rraghvani,

now I have the solution. With VBScript it only works with "CStr(MyBooleanVariable)" otherwise the log entry remains empty.

Tested with TC Version:
15.44.11.7 x64
15.45.31.7 x64

rraghvani
Champion Level 3

For VBScript, the syntax will be

"Debug: " & Project.Variables.ExtendedDebug & "; " & "ProjectSuite.ConfigPath: " & ProjectSuite.ConfigPath & ";"

Do not use +

cancel
Showing results for 
Search instead for 
Did you mean: