Welcome Guest, Not a member yet? Register   Sign In
How do I enabled DB error logging?
#1

[eluser]Jay Callicott[/eluser]
I am not sure if Code igniter has a way to log DB errors. I don't want to have to handle it each time I run a query. I would rather do it at the framework level.

I currently have all 30+ applications I've written running off the same code igniter framework.

If there is no code igniter way of doing things I will have to modify the DB library somewhere. I don't know if CI still doesn't let you override the DB lib.

I want to make a config var that says whether or not to log DB errors, and if it's enabled I want all errors logged in a similar way that PHP error logging currently exists.

Any ideas?
#2

[eluser]valarkin[/eluser]
Hey Jay,

As a quick thought, why not create a library that will wraps your calls to the CI database functions. You can't override the database library at this time.

I am still new to CI so this may not be the best solution, but it was the first thought I had.
#3

[eluser]Jay Callicott[/eluser]
well i could do that except i need a solution that works retroactively
#4

[eluser]Jay Callicott[/eluser]
anybody else have an idea?
#5

[eluser]bd3521[/eluser]
do some logging when 'error_db' is called.




Theme © iAndrew 2016 - Forum software by © MyBB