Out-of-band logging from XQuery functions
Thursday, 29 March 2012 · 3 messages · last reply 30 Mar 2012
DP
Quoted text · 15:55:11 · 10 lines
Am Donnerstag, 29. März 2012, 15:55:11 schrieb Charles Duffy: > Howdy -- > > Is any mechanism available for queries to log errors out-of-band without > modifying their return values? > > Something like a wrapper around log4j would be perfect; right now I'm > using file:append(), but as this requires my queries to know where the > system administrator wants things to be logged to (which should be an > entirely separate concern), it's very far from ideal.
Hi,
AFAIK, currently, there is no logging mechanism. But, maybe, you can access log4j using the Java bindings [1].
Regards,
Dimitar
[1] http://docs.basex.org/wiki/Java_Bindings
CD
Charles Duffy30 Mar 2012 00:55 #
Howdy --
Is any mechanism available for queries to log errors out-of-band without modifying their return values?
Something like a wrapper around log4j would be perfect; right now I'm using
file:append(), but as this requires my queries to know where the system administrator wants things to be logged to (which should be an entirely separate concern), it's very far from ideal.CD
Quoted text · 15:55:11 · 16 lines
On 03/29/2012 04:24 PM, Dimitar Popov wrote: > Am Donnerstag, 29. März 2012, 15:55:11 schrieb Charles Duffy: >> Howdy -- >> >> Is any mechanism available for queries to log errors out-of-band without >> modifying their return values? >> >> Something like a wrapper around log4j would be perfect; right now I'm >> using file:append(), but as this requires my queries to know where the >> system administrator wants things to be logged to (which should be an >> entirely separate concern), it's very far from ideal. > > Hi, > > AFAIK, currently, there is no logging mechanism. But, maybe, you can access > log4j using the Java bindings [1].
The java bindings requiring ADMIN makes them quite considerably less useful for my purposes, including in this case.
If the Java module mechanism were finished out, such that I could write a module wrapping log4j but not requiring the privileges to run arbitrary Java code, that would be considerably more useful.
Written for BaseX 7.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery