Micro-tracker MongoDB backend
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 toutracker
-
collection_name
allow you to choose the collection you want to use, default toentries