-
Notifications
You must be signed in to change notification settings - Fork 50
Mongodblogger settings
In this page explained each parameter of MongodbLogger settings.
Name of MongoDB database, where was created collection for store logs. If you using Mongoid, when MongodbLogger will use Mongoid database (if you not setup mongodb_logger.yml).
Example:
database: my_app
For logging into MongoDB, MongodbLogger use special type of collection - capped collections (More info). Capped collections provide a high-performance means for storing logging documents in the database. Inserting objects in an unindexed capped collection will be close to the speed of logging to a filesystem. Additionally, with the built-in FIFO mechanism, you are not at risk of using excessive disk space for the logging. This params setup size of capped collection.
Example:
capsize: <%= 100.megabytes %> # set 100 MB
This parameter give information, how to connect to MongoDB.
This parameter give information, how to connect to MongoDB.
Auth username.
Auth password.
If you have several MongoDB in replication, this parameter should be in "true" state. In this case, if master of MongoDB will down, the MongodbLogger will try reconnect to new MongoDB master.
This parameter set write concern for mongo adapter. More information you can read here.
This parameter set application_name in log. This parameter can be usefull, if you have several web nodes, which write logs in same storage and want to know, what node write this log.
By default MongodbLogger does not block the regular logging to file. If you want to log ONLY to MongoDB without logging to file, then set this parameter "true".
By default MongodbLogger create and write logs into "#{Rails.env}_log" collection. By this parameter you can customize name of using collection.
Initialize a connection to MongoDB using the MongoDB URI spec. The URI must fit this specification:
mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
Set to true
to use SSL when connecting to MongoDB.