Forum Discussion

mooitc's avatar
mooitc
Occasional Contributor
2 years ago
Solved

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?

  • For VBScript, the syntax will be

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

    Do not use +

5 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    For VBScript, the syntax will be

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

    Do not use +

    • mooitc's avatar
      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's avatar
    rraghvani
    Champion Level 3

    After changing ExtendedDebug from String to Boolean, it still works

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

    • mooitc's avatar
      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