Debugging
Enable System Debugging
To permanently enable system debugging, add the following line to your $OMQ_DIR/etc/options
file:
qorus.debug-system: true
and then restart the server.
In addition to increasing the verbose
level of the server (or interface); system debugging can be enabled online with the following rest command (from Qorus 3.1+):
qrest put system/setDebug
disable with:
qrest put system/setDebug flag=false
When you turn on debugging, you should get verbose information (including stack backtraces) for system exceptions, which can be helpful when debugging the system itself.
HTTP Debugging
list listeners:
qrest system/listeners?short
Turn on HTTP header and body logging for a particular listener (in this example, qorus-0
):
qrest put system/listeners/qorus-0/setLogOptions option=-1
Note: The HTTP or service logger must have log level
DEBUG
or higher; call the following REST API to ensure that the log level is high enough:
qrest post system/http/logger cloneDefault=1; qrest put system/http/logger level=DEBUG
or for service
my-service
:
qrest post services/my-service/logger cloneDefault=1; qrest put services/my-service/logger level=DEBUG
Turn off HTTP header and body logging for a particular listener (in this example, qorus-0
):
qrest put system/listeners/qorus-0/setLogOptions option=0
Create a Connection While Offline
If you have your environment set up properly (docs here; in particular the QORE_DATA_PROVIDERS
and QORE_DATASOURCE_PROVIDERS
environment variables), connections can be queried, added, updated, and deleted with qdp
.
Here is an example creating a datasource offline:
qdp omq/connections create name=omquser,description="omquser datasource",url="db://oracle:omquser/omquser@ol8",connection_type=DATASOURCE
Note:
qdp
and the DataProvider API were introduced in Qorus 4.1