Skip to content
This repository

Example apps using Zend Framework for store logs in CouchDb

tag: blog-version-1

Fetching latest commit…

Cannot retrieve the latest commit at this time



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
  • or using PHP as in example IndexController

Something went wrong with that request. Please try again.