2017 © Pedro Peláez
 

kohana-module kohana-log-database

Database log writer for Kohana 3.3

image

manc/kohana-log-database

Database log writer for Kohana 3.3

  • Friday, February 21, 2014
  • by manc
  • Repository
  • 4 Watchers
  • 5 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

kohana-log-database

A database log writer for Kohana 3., (*1)

This is a first version which works in Kohana 3.3. In the future there might be a more beautiful rendering of array data and maybe an easier installation. But for now it does its job., (*2)

Installation

You may add this module manually as a Git submodule to your Kohana project's modules directory or if you're using Composer, add this requirement to your composer.json file:, (*3)

{
    "require": {
        "manc/kohana-log-database": "dev-master"
    }
}

Then add the module in your bootstrap.php – and also make sure the database module is added (and configured). Example:, (*4)

Kohana::modules(array(
    'database'   => MODPATH.'database',
    'logdb'      => MODPATH.'kohana-log-database',
));

Manually add the required table to your database. You will find the structure in the file logs-schema-mysql.sql. Your database must be configured in Kohana with the database module., (*5)

Usage

By default Kohana's bootstrap.php contains this line:, (*6)

Kohana::$log->attach(new Log_File(APPPATH.'logs'));

You can remove or comment it out if you no longer need it. To enable the database log writer add the following line after loading the module via Kohana::modules():, (*7)

Kohana::$log->attach(new Log_Database('logs'));

The parameter of the constructor of class Log_Database represents the table name used for logging., (*8)

The Versions

21/02 2014

dev-master

9999999-dev

Database log writer for Kohana 3.3

  Sources   Download

The Requires

 

by Nick Zahn

database log logging kohana