Skip to content
This repository

without this central_logger makes rails 3.2.3 teh failz #28

Merged
merged 1 commit into from about 2 years ago

2 participants

ara.t.howard Alex Stupka
ara.t.howard

specifically, cherry picking active_support/core_ext fubars tons of shit like mailer's default_url_options, etc. we don't need to load the entire lib to compute 2^20 - so don't...

ara.t.howard

see rails/rails@c41f08c for the commit that introduced the change in rails - loading as too early triggers this

Alex Stupka astupka merged commit 4eb9489 into from April 04, 2012
Alex Stupka astupka closed this April 04, 2012
Alex Stupka
Collaborator

Thanks for the help!

ara.t.howard

np. really liking this approach to logging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Apr 04, 2012
ara.t.howard pulling in active_support early will blow up rails 3.2.3 - so compute…
… MB.
0669019
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 4 deletions. Show diff stats Hide diff stats

  1. 7  lib/central_logger/mongo_logger.rb
7  lib/central_logger/mongo_logger.rb
... ...
@@ -1,15 +1,14 @@
1 1
 require 'erb'
2 2
 require 'mongo'
3  
-require 'active_support'
4  
-require 'active_support/core_ext'
5 3
 require 'central_logger/replica_set_helper'
6 4
 
7 5
 module CentralLogger
8 6
   class MongoLogger < ActiveSupport::BufferedLogger
9 7
     include ReplicaSetHelper
10 8
 
11  
-    PRODUCTION_COLLECTION_SIZE = 250.megabytes
12  
-    DEFAULT_COLLECTION_SIZE = 100.megabytes
  9
+    MB = 2 ** 20
  10
+    PRODUCTION_COLLECTION_SIZE = 256 * MB
  11
+    DEFAULT_COLLECTION_SIZE = 128 * MB
13 12
     # Looks for configuration files in this order
14 13
     CONFIGURATION_FILES = ["central_logger.yml", "mongoid.yml", "database.yml"]
15 14
     LOG_LEVEL_SYM = [:debug, :info, :warn, :error, :fatal, :unknown]
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.