[ic] Displaying SQL-Errors in the Administration Panel
Paul Jordan
paul at gishnetwork.com
Wed Jul 9 22:30:51 EDT 2003
> I am working on it now. There is some question in my mind as to
> what should be done on an error, and my inclination is to do this:
>
> 1. Set up logging levels on a per-table basis, with
> defaults that can be set with DatabaseDefault:
>
> DatabaseDefault LOG_ERROR_CATALOG 1
> DatabaseDefault LOG_ERROR_SESSION 1
> DatabaseDefault LOG_ERROR_GLOBAL 0
> DatabaseDefault DIE_ERROR 0
>
> 2. Log errors to the catalog error.log by default.
>
> Database inventory LOG_ERROR_CATALOG 0|1*
>
> 3. Log errors to the session always if an admin, and
> controlled by configuration if not.
>
> Database inventory LOG_ERROR_SESSION 0|1*
>
> This would have the effect of giving a big red error message
> when such an event as failing to create a record occured. In
> most cases, you would be able to use the <-Back button and
> fix the error and resubmit.
>
> 4. Die at the page level (500 error) only if that is explicit
> request in config for that table:
>
> Database inventory DIE_ERROR 0*|1
>
> 5. Log errors globally only on explicit request:
>
> Database inventory LOG_ERROR_GLOBAL 0*|1
>
> 6. LENGTH_EXCEPTION errors would go into warnings if they
> are handled with truncate.
>
> * default
>
> Does this seem reasonable?
>
> --
> Mike Heins
This sounds excellent. And, if it is still honored, the no-requery option for
the [query] tag can be used to turn off errors for specific queries.
Reporting "real" errors, keeping logs manageable (size, relevance), and having
pertinent info qucikly at hand is I think attainable with the above plan.
Paul
More information about the interchange-users
mailing list