function prof:dump not working
Monday, 22 January 2024 · 2 messages
DS
DK Singh22 Jan 2024 12:44 #
Hi,
I am using BaseX 9.5 and we are using the prof:dump() function for debugging code and data. When a query is run in the BaseX GUI, the output of prof:dump() is shown in the info view.
When we are calling this function in XQUERY and try to print output of prof:dump() in the log then it is not printing anything.
As per BaseX documentation, if
LOGTRACE is 'ON' and BaseX is being used as a web-application, then the output of prof:dump() function gets logged in database logs. Checked on the server, LOGTRACE is 'ON' but the output is not getting logged in log file..
Also we try it to store output prof:dump() in a variable and print it into log file but not workinglet $_Logs := prof:dump($work/@id || ' (' || $work/*:titleSet/*:title[1] ||
')', 'Excluded from output, as no media found: ')
return admin:write-log('output of function prof:dump is: '|| $_Logs)Can you please suggest how we can capture output of function prof:dump() in a XML format or in the BaseX log file?
Thank You
Dharmendra
CG
Christian Grün22 Jan 2024 17:30 #
Hi Dharmendra,
I invite you to share a little self-contained example with us.
Can you reproduce it with the latest version of BaseX?
Thanks in advance,
Christian
Quoted text · DK Singh · 28 lines
DK Singh <dharam.mahi at gmail.com> schrieb am Mo., 22. Jan. 2024, 12:44: > Hi, > I am using BaseX 9.5 and we are using the prof:dump() function for > debugging code and data. When a query is run in the BaseX GUI, the output > of prof:dump() is shown in the info view. > > When we are calling this function in XQUERY and try to print output of > prof:dump() in the log then it is not printing anything. > > As per BaseX documentation, if LOGTRACE is 'ON' and BaseX is being used as > a web-application, then the output of prof:dump() function gets logged in > database logs. Checked on the server, LOGTRACE is 'ON' but the output is > not getting logged in log file.. > > Also we try it to store output prof:dump() in a variable and print it into > log file but not working > > let $_Logs := prof:dump($work/@id || ' (' || $work/*:titleSet/*:title[1] > || ')', 'Excluded from output, as no media found: ') > return admin:write-log('output of function prof:dump is: '|| $_Logs) > > Can you please suggest how we can capture output of function prof:dump() > in a XML format or in the BaseX log file? > > Thank You > Dharmendra > >
Written for BaseX 10.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery