Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Easiest way to save the logs into a table
  • Hi there,

    I want write the "logs" into a table. Any tips or suggestions how to do that?
    Is there an easy way... maybe a fuelphp solution for that. Perhaps I have overlooked something !?

    Thank u for any comments :)
  • HarroHarro
    Accepted Answer
    If by logs you mean logging information written by the Log class, I would:

    - upgrade to 1.6/develop to have full monolog functionality
    - copy the MongoDBHandler from Monolog, rename it, and modify it to use Fuel's DB class
    - use \Log::instance()->pushHandler() to add the new DB handler to monolog

    If you only want the DB logging, and no file logging anymore, you will have to extend the Log class, and overload _init() so that is uses your DB handler instead of the default StreamHandler.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion