Skip to content

nicoolas25/micro-tracker-mongodb

Repository files navigation

Micro-tracker MongoDB backend

Build Status Code Climate Test Coverage Gem Version

This is a MongoDB backend for the utracker gem.

Installation

Add utracker-mongodb in your Gemfile. It will add the dependency to the utracker gem itself.

Usage

require 'utracker'
require 'utracker/mongodb'

Utracker.configure do |config|
  # ...

  # Set the log to the MongoDB instance at the MONGODB_URI env variable.
  # If no MONGODB_URI can be found, it will look MongoDB on localhost:27017.
  config[:logger] = Utracker::MongoDB::Logger.new(database_name: 'utracker')

  # ...
end

There is some options available when you're using the logger:

  • database_name allow you to choose the database you want to use, default to utracker
  • collection_name allow you to choose the collection you want to use, default to entries

About

A MongoDB backend for utracker.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages