Download the PHP package assisjeferson/cakephp-databaselog without Composer

On this page you can find all versions of the php package assisjeferson/cakephp-databaselog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cakephp-databaselog

CakePHP DatabaseLog Plugin

Build Status Coverage Status Latest Stable Version Minimum PHP Version License Total Downloads

DatabaseLog engine for CakePHP applications.

This branch is for CakePHP 3.x

Features

Log Rotation

While file handling requires file log rotation and splitting into chunks of (compressed) files, a database approach can more easily keep the logs together in a single database. This is more convinient when looking through them or searching for something specific.

This plugin internally combines log entries of the exact same "content" into a single row with an increased count. Additionally you would want to add a cronjob triggered cleanup shell to keep the total size and row count below a certain threshold.

Demo

Clone and install the sandbox app, create some errors and browse the admin backend for the logs overview.

Or just attach it to your app directly. Time needed: 5 minutes.

Install

Composer (preferred)

Setup

Enable the plugin in your config/bootstrap.php:

or just call:

You can simply modify the existing config entries in your config/app.php:

This will use the database_log connection and an SQLite file database by default, stored in your logs folder.

Using an actual database (optional)

Create a config setting in your config/app.php what database connection it should log to:

It is recommended to not use the same datasource as your production server (default) because when the DB is not reachable logging to it will also not be possible. In that case it will fallback to SQLite file logging on this server instance, though.

Once the datasource is reachable and once the first log entry is being written, the database table (defaulting to database_logs) will be automatically created. No need to manually run any migration or SQL script here. You can also manually create the table before hand, if you prefer:

Or just copy the migration file into your app /config/Migrations, modify if needed, and then run it as part of your app migrations.

Fully tested so far are PostgreSQL and MySQL, but by using the ORM all major databases should be supported.

Usage

Anywhere in your app where you call $this->log() or Log::write() the DatabaseLog engine will be used.

There is also a browsable web backend you can view your logs with.

See docs for more details.


All versions of cakephp-databaselog with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
cakephp/cakephp Version ^3.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package assisjeferson/cakephp-databaselog contains the following files

Loading the files please wait ....