winston_mongodb_rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -17,7 +17,7 @@ Add `config/initializers/mongo_logger.rb`
17
17
  Mog = WinstonMongodbRails::MongoLogger.create_logger(app_config, ((app_config.paths.log.to_a rescue nil) || app_config.paths['log']).first)
18
18
 
19
19
 
20
- For mongo configuration, you need to add the configuration of the mongodb database to `mongoid.yml` or `database.yml`
20
+ For mongo configuration, you need to add the configuration of the mongodb database to `config/mongo_logger.yml`, `config/mongoid.yml` or `config/database.yml`
21
21
 
22
22
  production:
23
23
  username: username
@@ -25,6 +25,12 @@ For mongo configuration, you need to add the configuration of the mongodb databa
25
25
  database: logs
26
26
  replicaset: ['10.10.10.2:27017', '10.10.10.1:27017']
27
27
  replicaset_name: 'replicaset_name'
28
+
29
+ development:
30
+ username: username
31
+ password: password
32
+ database: logs
33
+ host: localhost
28
34
 
29
35
 
30
36
  ## Usage
@@ -62,7 +62,7 @@ module WinstonMongodbRails
62
62
  end
63
63
 
64
64
  def connect
65
- @mongo_connection ||= MongoDatabase.new.connection
65
+ @mongo_connection ||= MongoDatabase.new(@db_configuration).connection
66
66
  @logs_database ||= @mongo_connection.db(@mongo_database_name)
67
67
  @logs_collection ||= @logs_database.collection(@mongo_collection_name)
68
68
  end
@@ -1,3 +1,3 @@
1
1
  module WinstonMongodbRails
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winston_mongodb_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alastair Brunton