manc / kohana-log-database Goto Github PK
View Code? Open in Web Editor NEWA database log writer for Kohana 3.3
A database log writer for Kohana 3.3
You should update your DB schema so that null is allowed for the file- and line-columns. In the event of a critical error where Kohana_Core's shutdown_handler-method is executed, the raw HTML source code is displayed as the page content. The DB::insert-method fails, echoing the error message in the raw HTML code and there are no exception handlers left to catch that exception.
For instance, try having Allow Null set to false for file- and line-columns and typing this somewhere in your code:
<?php echo echo 'something'; ?>
An alternative way to solve this (and perhaps safer) is to have a try and catch-block inside the write-method of the Log_Database-class. The catch-statement could catch Database_Exception, then do nothing. In case of a catastrophic failure, at least the insert statements (if they fail) won't make it worse.
Thanks for this module.
But what's with the var_dump($messages); in Database.php's write method? Kohana's default error page looks pretty bad with that huge cluster of text at the top.
I'm guessing this is for debugging and that you forgot to remove this line. Amirite? :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.