Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abtris/phplogger-couchdb
Example apps using Zend Framework for store logs in CouchDb
https://github.com/abtris/phplogger-couchdb
Last synced: about 1 month ago
JSON representation
Example apps using Zend Framework for store logs in CouchDb
- Host: GitHub
- URL: https://github.com/abtris/phplogger-couchdb
- Owner: abtris
- Created: 2010-08-20T15:07:18.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-09-07T12:11:02.000Z (about 14 years ago)
- Last Synced: 2024-04-15T03:04:08.167Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 141 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
README
------CouchDB Log Writer for Zend Framework
For logs are nosql database is better than RBMS.
- map functions (all log messages)
function(doc) {
emit(doc.priorityName,[doc.timestamp,doc.message, doc.module, doc.controller]);
}- map function by priority (save as logger/log_by_prior)
function(doc) {
if (doc.priority) {
emit(doc.priority, [doc.priorityName, doc.timestamp, doc.message, doc.module, doc.controller]);
}
}- map function by timestamp (save as logger/log_by_timestamp)
function(doc) {
if (doc.timestamp) {
emit(doc.timestamp, [doc.priorityName, doc.message, doc.module, doc.controller]);
}
}- call by using
http://127.0.0.1:5984/test-log/_design/log_by_prior/_view/log_by_prior/?key=%22ERR%22
- or using PHP as in example IndexController