Hello,
I have a particular use case and some questions.
According to the virtuoso documentation, when Virtuoso is running with
a console or with stdout going somewhere like a file,
I can print debug messages using using dbg_printf() and dbg_obj_print().
What I would like to archieve now is to attach those messages to
different log files (maybe tables or graphs) according
to the procedure that called the dbg_printf() function, and/or a
threshold level.
What do you recommend to get this functionality?
I was thinking about setting something like this.
registry_set('log.appender.TEST.file','test_results.log');
registry_set('log.appender.TEST.Threshold', 'INFO'),
registry_set('log.appender.ERROR.file','error.log');
registry_set('log.appender.ERROR.Threshold','ERROR');
registry_set('log.function.DB.DBA.SOME_FUNCTION_NAME','TEST, ERROR');
registry_set('log.function.DB.DBA.ANOTHER_FUNCTION_NAME','ERROR');
And then use a piece of code like dbg_obj_print_2( message ,
errorlevel) to persist the messages.
But I wonder if there is an already implemented or cleaner way to archieve this.
Thank you,
Cristian
pd1: Are there any functions that returns readable descriptions like
the output of dbg_obj_print?
Pd2: I've seen on some code calls to 'dbg_obj_princ', whats the
difference with 'dbg_obj_princ' and 'dbg_obj_print'?