mongodblogroute MongoDB log route

  1. Requirements
  2. Usage
  3. History

MongoDB Log Route.

Requirements

Yii 1.1.8 or above

Usage

Install

Extract the release file under protected/extensions

In config/main.php:

'log'=>array(
  'class'=>'CLogRouter',
  'routes'=>array(
    array(
      'class'=>'ext.EMongoDbLogRoute',
      'levels'=>'trace, info, error, warning',
      'categories' => 'system.*',
    ),
  ),
),
Options
  • connectionString : host:port : defalut localhost:27017
  • dbName : database name : default test
  • collectionName : collaction name : default yiilog
  • message : message column name : default message
  • level : level column name : default level
  • category : category column name : default category
  • timestamp : timestamp column name : default timestamp
  • timestampType : float or date : default float
  • collectionSize : capped collection size : default 10000
  • collectionMax : capped collection max : default 100
  • installCappedCollection : capped collection install flag : default false
  • fsync : fsync flag : default false
  • safe : safe flag : default false
  • timeout : timeout miliseconds : default null i.e. MongoCursor::$timeout
Caped colection
  1. Set installCappedCollection true in main.php.
  2. Run application and loged.
  3. Remove installCappedCollection in main.php.

History

2011/08/01 ver 1.2

Add fsync, safe, timeout options

2011/07/09 ver 1.1

Add capped collection : Thank you joblo

2011/06/23 ver 1.0

First Release

2 0
4 followers
1 168 downloads
Yii Version: 1.1
License: MIT
Category: Logging
Tags: mongodb
Developed by: aoyagikouhei
Created on: Jul 7, 2011
Last updated: 13 years ago

Downloads

show all

Related Extensions