Skip to main content

Problem with javascript API logging

Answered

Comments

3 comments

  • Andrey Terentyev
    • Network Optix team

    Hello,

    there are several options.

    1. Instead of window.vms.log, use the vms.log object. For example,

    vms.log.error(“some sort of error message”) 

     logs message with ERROR log level to the Nx Wintess log file.

    See https://meta.nxvms.com/docs/developers/knowledgebase/328-in-client-javascript-api for detail on JS API.

    See https://support.networkoptix.com/hc/en-us/articles/8503187042455-How-to-Change-Software-Logging-Level-and-Get-Logs- for details on log files and levels.

    2. Use developer console for logging.
    You could define the QTWEBENGINE_REMOTE_DEBUGGING environment variable in the session where the NX Witness runs. For example,

    QTWEBENGINE_REMOTE_DEBUGGING=1111

    Start the Nx Witness application.

    Open your web page in Nx Witness.

    Open your browser and connect to 127.0.0.1:1111 to access the developer console.

    0
  • Stephanie

    Hello

    I tried your given option but not working on my side

    0
  • Andrey Terentyev
    • Network Optix team

    Hi,

    On Windows

    1. In the "Advanced system settings" set the environment variable. 

    QTWEBENGINE_REMOTE_DEBUGGING=1111

    2. Relogin to your user session.

    3. Start the Nx Witness application.

    4. Open a web page in the Nx Witness application.

    5. Open a Chrome browser and connect to localhost:1111

    On Linux

    1. in terminal launch this command

    echo "export QTWEBENGINE_REMOTE_DEBUGGING=1111" >> ~/.profile

    Repeat steps 2 - 5

    0

Please sign in to leave a comment.