freefri/cake-databaselog
最新稳定版本:0.1.6
Composer 安装命令:
composer require freefri/cake-databaselog
包简介
Storing CakePHP log into database.
关键字:
README 文档
README
Simple storing CakePHP 2.x log into a database.
This package does not automatically update in packagist.org
Installation
Add "freefri/cake-databaselog": "dev-master", to your composer.json or clone the repository into Plugin/CakeDatabaselog
Load the plugin in your bootstrap.php CakePlugin::load('CakeDatabaselog');
Create a table in your database kind of this:
CREATE TABLE `log_entries` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(50) DEFAULT NULL,
`title` varchar(30) DEFAULT NULL,
`message` text,
`environment` varchar(100) DEFAULT NULL,
`server` text,
`created` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
Use the new engine to log in bootstrap.php
CakeLog::config(
'debug', [
'engine' => 'CakeDatabaselog.DatabaseLog',
'types' => ['notice', 'info', 'debug'],
'environment' => 'production-server',
]
);
Related projects
You may also be interested in a more complex solution: https://github.com/dereuromark/CakePHP-DatabaseLog (those two projects are not related)
统计信息
- 总下载量: 9.9k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-03-17