Forum OpenACS Development: Re: Add ad_log_stack_trace to db_transaction errors

Collapse
Posted by Dave Bauer on
Actually, you are right, in all cases we need the stack trace, whether or not on_error is specified. When the error is caught we only see the text of the error message but we can't see the context so debugging is impossible.

Having just the error message might be useful to parse the error message to generate a meaningful error for the user, but doesn't help programmers.

Collapse
Posted by Gustaf Neumann on
i was just asking for clarity. Do we have code-pieces, where transactions fail frequently (not only in error cases)? Maybe it is a good idea to add a switch "-logging severity" (default "error") and use the severity in the ns_log command.

Btw, this could be used nicely together with the ns_log redirector i wrote long ago. The redirector allows to perform arbitrary actions depending on the severity level of ns_log. With the redirector, one can e.g. write e.g. "ns_log error ..." messages additionally into ds_comments, such you do not have to search around in the error log file.

For someone interested, i have just committed the ns_log redirector deactivated to cvs head in xotcl-core.