Server version: 184.108.40.206270
I made web charts and UI to integrate NX Witness better with my own server.
Followed the js_api_example, tried to make some debug messages show up,
with the original settings of "window.vms.log.info", "window.vms.log.error" inside the sample code.
but I cannot find them anywhere when they should show up.
Neither "Event Log" inside NX Witness, nor the log file inside "server/log" folder.
1. Where can I see the logs?
2. What is the best practice to debug web in built-in browser, since it's lack of development console?
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://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,
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.
1. In the "Advanced system settings" set the environment variable.
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
1. in terminal launch this command
echo "export QTWEBENGINE_REMOTE_DEBUGGING=1111" >> ~/.profile
Repeat steps 2 - 5
Please sign in to leave a comment.