mongodb_logger 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ When /^I generate a new Rails application$/ do
20
20
  else
21
21
  raise "Unable to generate a Rails application:\n#{@terminal.output}"
22
22
  end
23
- require_thread if rails30?
23
+ #require_thread if rails30?
24
24
  end
25
25
 
26
26
  When /^I configure my application to require the "([^\"]*)" gem(?: with version "(.+)")?$/ do |gem_name, version|
@@ -52,4 +52,4 @@ end
52
52
  When /^I run "([^\"]*)"$/ do |command|
53
53
  @terminal.cd(rails_root)
54
54
  @terminal.run(command)
55
- end
55
+ end
@@ -19,6 +19,10 @@ module MongodbLogger
19
19
  path = options[:path] || File.join(Rails.root, "log/#{Rails.env}.log")
20
20
  level = options[:level] || DEBUG
21
21
  internal_initialize
22
+ rescue => e
23
+ # should use a config block for this
24
+ Rails.env.production? ? (raise e) : (puts "!!! MongodbLoggerError: Using BufferedLogger due to exception: " + e.message)
25
+ ensure
22
26
  if disable_file_logging?
23
27
  @level = level
24
28
  @buffer = {}
@@ -27,9 +31,6 @@ module MongodbLogger
27
31
  else
28
32
  super(path, level)
29
33
  end
30
- rescue => e
31
- # should use a config block for this
32
- Rails.env.production? ? (raise e) : (puts "Using BufferedLogger due to exception: " + e.message)
33
34
  end
34
35
 
35
36
  def add_metadata(options={})
@@ -59,10 +60,6 @@ module MongodbLogger
59
60
  create_collection
60
61
  end
61
62
  end
62
-
63
- def flush
64
- # do nothing
65
- end
66
63
 
67
64
  def mongoize(options={})
68
65
  @mongo_record = options.merge({
@@ -26,7 +26,7 @@ module MongodbLogger
26
26
  else
27
27
  set :public, "#{dir}/server/public"
28
28
  end
29
- set :environment, :production
29
+ #set :environment, :production
30
30
  set :static, true
31
31
 
32
32
  helpers do
@@ -4,6 +4,8 @@ $ ->
4
4
  MongodbLoggerJS =
5
5
  tail_logs_url: null
6
6
  tail_log_started: false
7
+ log_info_offset: null
8
+ log_info_padding: 15
7
9
 
8
10
  init: ->
9
11
  $(document).ajaxStart =>
@@ -30,6 +32,18 @@ MongodbLoggerJS =
30
32
  elm_obj.parents('tr').addClass('current')
31
33
  $('#log_info').load(url)
32
34
  return false
35
+ # filter tougle
36
+ $('div.filter-toggle').live 'click', (event) =>
37
+ $('div.filter').slideToggle()
38
+ # log info window
39
+ MongodbLoggerJS.log_info_offset = $("#log_info").offset()
40
+ $(window).scroll =>
41
+ if $(window).scrollTop() > MongodbLoggerJS.log_info_offset.top
42
+ $("#log_info").stop().animate
43
+ marginTop: $(window).scrollTop() - MongodbLoggerJS.log_info_offset.top + MongodbLoggerJS.log_info_padding
44
+ else
45
+ $("#log_info").stop().animate
46
+ marginTop: 0
33
47
 
34
48
  tail_logs: (count) ->
35
49
  url = MongodbLoggerJS.tail_logs_url
@@ -48,8 +62,9 @@ MongodbLoggerJS =
48
62
  if count != data.count
49
63
  count = data.count
50
64
  if data.content? && data.content.length > 0
51
- data.content += '<tr class="tail_date"><td colspan="6">' + data.time + '</td></tr>'
52
- $('#logs_list tr:first').after(data.content).effect("highlight", {}, 1000)
65
+ elements = $(data.content)
66
+ elements.addClass('newlog')
67
+ $('#logs_list tr:first').after(elements).effect("highlight", {}, 1000)
53
68
  if MongodbLoggerJS.tail_log_started
54
69
  fcallback = -> MongodbLoggerJS.tail_logs(count)
55
70
  setTimeout fcallback, 2000
@@ -3,7 +3,7 @@ module MongodbLogger
3
3
  class Filter
4
4
 
5
5
  DEFAULT_LIMIT = 2000
6
- FIXED_PARAMS = ['action', 'controller', 'ip', 'application_name']
6
+ FIXED_PARAMS = ['action', 'controller', 'ip', 'application_name', 'is_exception']
7
7
  attr_reader :params, :mongo_conditions, :mongo_limit
8
8
 
9
9
  def initialize(params)
@@ -19,6 +19,14 @@ module MongodbLogger
19
19
  self.class.send(:define_method, k, proc{self.instance_variable_get("@#{k}")}) ## method to return instance variable
20
20
  self.class.send(:define_method, "#{k}=", proc{|v| self.instance_variable_set("@#{k}", v)}) ## method to set instance variable
21
21
  end
22
+
23
+ if !self.respond_to?("limit")
24
+ self.instance_variable_set("@limit", DEFAULT_LIMIT.to_s) ## create instance variable
25
+ self.class.send(:define_method, "limit", proc{self.instance_variable_get("@limit")}) ## method to return instance variable
26
+ self.class.send(:define_method, "limit=", proc{|v| self.instance_variable_set("@limit", DEFAULT_LIMIT.to_s)}) ## method to set instance variable
27
+ elsif self.limit.nil?
28
+ self.limit = DEFAULT_LIMIT.to_s
29
+ end
22
30
  build_mongo_conditions
23
31
  end
24
32
 
@@ -27,12 +35,16 @@ module MongodbLogger
27
35
  FIXED_PARAMS.each do |param_key|
28
36
  if self.respond_to?(param_key)
29
37
  value = self.send param_key
30
- @mongo_conditions[param_key.to_s] = value unless value.blank?
38
+ if 'is_exception' == param_key
39
+ @mongo_conditions[param_key.to_s] = true if value && !value.blank?
40
+ else
41
+ @mongo_conditions[param_key.to_s] = value unless value.blank?
42
+ end
31
43
  end
32
44
  end
33
45
  # set limit
34
46
  @mongo_limit = DEFAULT_LIMIT
35
- @mongo_limit = self.limit if self.respond_to?("limit")
47
+ @mongo_limit = self.limit.to_i if self.respond_to?("limit")
36
48
  end
37
49
 
38
50
  def get_mongo_conditions
@@ -8,6 +8,8 @@
8
8
  MongodbLoggerJS = {
9
9
  tail_logs_url: null,
10
10
  tail_log_started: false,
11
+ log_info_offset: null,
12
+ log_info_padding: 15,
11
13
  init: function() {
12
14
  var _this = this;
13
15
  $(document).ajaxStart(function() {
@@ -27,7 +29,7 @@
27
29
  $('#tail_logs_block').removeClass('started');
28
30
  return false;
29
31
  });
30
- return $('.log_info').live('click', function(event) {
32
+ $('.log_info').live('click', function(event) {
31
33
  var elm_obj, url;
32
34
  elm_obj = $(event.target);
33
35
  url = elm_obj.attr('data-url');
@@ -39,6 +41,21 @@
39
41
  }
40
42
  return false;
41
43
  });
44
+ $('div.filter-toggle').live('click', function(event) {
45
+ return $('div.filter').slideToggle();
46
+ });
47
+ MongodbLoggerJS.log_info_offset = $("#log_info").offset();
48
+ return $(window).scroll(function() {
49
+ if ($(window).scrollTop() > MongodbLoggerJS.log_info_offset.top) {
50
+ return $("#log_info").stop().animate({
51
+ marginTop: $(window).scrollTop() - MongodbLoggerJS.log_info_offset.top + MongodbLoggerJS.log_info_padding
52
+ });
53
+ } else {
54
+ return $("#log_info").stop().animate({
55
+ marginTop: 0
56
+ });
57
+ }
58
+ });
42
59
  },
43
60
  tail_logs: function(count) {
44
61
  var url;
@@ -54,14 +71,15 @@
54
71
  url: url,
55
72
  dataType: "json",
56
73
  success: function(data) {
57
- var fcallback;
74
+ var elements, fcallback;
58
75
  if (data.time) {
59
76
  $('#tail_logs_time').text(data.time);
60
77
  if (count !== data.count) {
61
78
  count = data.count;
62
79
  if ((data.content != null) && data.content.length > 0) {
63
- data.content += '<tr class="tail_date"><td colspan="6">' + data.time + '</td></tr>';
64
- $('#logs_list tr:first').after(data.content).effect("highlight", {}, 1000);
80
+ elements = $(data.content);
81
+ elements.addClass('newlog');
82
+ $('#logs_list tr:first').after(elements).effect("highlight", {}, 1000);
65
83
  }
66
84
  }
67
85
  }
@@ -5,7 +5,6 @@ option {
5
5
  input[type="text"],
6
6
  input[type="password"],
7
7
  textarea {
8
- border: 0;
9
8
  width: 100%;
10
9
  padding: 4px 5px;
11
10
  -moz-box-sizing: border-box;
@@ -5,7 +5,7 @@ table {
5
5
 
6
6
  th {
7
7
  padding: 10px 20px;
8
- font-size: 16px;
8
+ font-size: 14px;
9
9
  font-weight: bold;
10
10
  border-bottom: 2px solid #ccc;
11
11
  }
@@ -14,12 +14,20 @@ td {
14
14
  padding: 10px 20px;
15
15
  border-top: 1px solid #ddd;
16
16
  background: #fff;
17
+ white-space: nowrap;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
17
20
  }
18
21
 
19
22
  tr:nth-child(even) td {
20
23
  background-color: #f8f8f8;
21
24
  }
22
25
 
26
+ tr.newlog td {
27
+ font-weight: bold;
28
+ background: #ffe;
29
+ }
30
+
23
31
  tr:hover td {
24
32
  background-color: #E7F4FB;
25
33
  }
@@ -40,3 +48,12 @@ th:last-child,
40
48
  td:last-child {
41
49
  text-align: right;
42
50
  }
51
+
52
+ .status-cell {
53
+ width: 10px;
54
+ text-align: center;
55
+ }
56
+
57
+ .url_log {
58
+ width: 10%;
59
+ }
@@ -54,6 +54,7 @@ body {
54
54
 
55
55
  .topline {
56
56
  height: 50px;
57
+ position: relative;
57
58
  background: rgb(238,238,238);
58
59
  border-bottom: 1px solid #ADB4B8;
59
60
  background: -moz-linear-gradient(top, rgba(238,238,238,1) 0%, rgba(204,204,204,1) 100%);
@@ -102,6 +103,7 @@ body {
102
103
  border: 1px solid #ADB4B8;
103
104
  background-color: #fff;
104
105
  box-shadow: 0 1px 2px rgba(25,25,25,0.2);
106
+ min-height: 500px;
105
107
  }
106
108
 
107
109
  .details {
@@ -123,7 +125,7 @@ body {
123
125
  background: -ms-linear-gradient(top, rgba(255,255,255,1) 1%,rgba(244,244,244,1) 49%,rgba(255,255,255,1) 100%);
124
126
  background: linear-gradient(top, rgba(255,255,255,1) 1%,rgba(244,244,244,1) 49%,rgba(255,255,255,1) 100%);
125
127
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ffffff',GradientType=0 );
126
-
128
+ min-height: 400px;
127
129
  }
128
130
 
129
131
  /* nav */
@@ -166,3 +168,16 @@ body {
166
168
  .footer a {
167
169
  color: #666;
168
170
  }
171
+
172
+ #ajax_loader {
173
+ display: none;
174
+ position: absolute;
175
+ top: 15px;
176
+ margin-left: -110px;
177
+ left: 50%;
178
+ }
179
+ /*
180
+ http://localhost:3000/mongodblogs/overview
181
+ ./bin/mongodb_logger_web ../mongo.yml -F
182
+
183
+ */
@@ -54,7 +54,32 @@ a:hover, a:active {
54
54
  background: url(../images/failure.png) no-repeat 100% 50%;
55
55
  }
56
56
 
57
- pre {
57
+ .notice {
58
+ width: 10px;
59
+ height: 10px;
60
+ display: inline-block;
61
+ margin-right: 4px;
62
+ margin-left: -14px;
63
+ background: url(../images/success.png) no-repeat 0 0;
64
+ }
65
+
66
+ .arrow-down {
67
+ padding-right: 15px;
68
+ background: url(../images/arrow-down.png) no-repeat 100% 50%;
69
+ }
70
+
71
+ .notice.new {
72
+ background: url(../images/newlog.png) no-repeat 0 0;
73
+ }
74
+
75
+ .error {
76
+ width: 10px;
77
+ height: 10px;
78
+ display: inline-block;
79
+ background: url(../images/failure.png) no-repeat 0 0;
80
+ }
81
+
82
+ code {
58
83
  display: block;
59
84
  overflow: auto;
60
85
  height: 260px;
@@ -91,6 +116,7 @@ pre {
91
116
  }
92
117
 
93
118
  .filter {
119
+ display: none;
94
120
  background-color: #ededed;
95
121
  box-shadow: 0 1px 2px #bbb inset;
96
122
  border-bottom: 1px solid #bbb;
@@ -114,6 +140,21 @@ pre {
114
140
 
115
141
  }
116
142
 
143
+ .logs-time {
144
+ width: 200px;
145
+ padding: 7px 15px;
146
+ -moz-box-sizing: border-box;
147
+ -webkit-box-sizing: border-box;
148
+ box-sizing: border-box;
149
+ font: 12px arial, sans-serif;
150
+ vertical-align: middle;
151
+ border: 1px solid #bbb;
152
+ background-color: #fff;
153
+ border-radius: 3px;
154
+ box-shadow: 0 1px 2px #e6e6e6 inset, 0 1px 0 #fff;
155
+ }
156
+
157
+
117
158
  #tail_logs_block.started .info, #tail_logs_block .initial {
118
159
  display: inline-block;
119
160
  }
@@ -126,9 +167,7 @@ pre {
126
167
  table-layout: fixed;
127
168
  }
128
169
 
129
- .url_log {
130
- width: 200px;
131
- text-overflow: clip;
132
- white-space: nowrap;
133
- overflow: hidden;
170
+
171
+ .wrap_text {
172
+ word-wrap: break-word;
134
173
  }
@@ -4,7 +4,7 @@ module Sinatra::ViewHelpers
4
4
  def text_field_tag(object, name, options = {})
5
5
  value = ""
6
6
  value = options.delete(:value) if options[:value]
7
- value = object.send name if object
7
+ value = object.send name if object && object.respond_to?(name)
8
8
  attr = []
9
9
  options.each do |key, val|
10
10
  attr << "#{key}='#{val}'"
@@ -17,7 +17,43 @@ module Sinatra::ViewHelpers
17
17
  options.each do |key, val|
18
18
  attr << "#{key}='#{val}'"
19
19
  end
20
- "<input type='submit' name='#{name.to_s}]' value='#{value}' #{attr.join(" ")} />"
20
+ "<input type='submit' name='#{name.to_s}' value='#{value}' #{attr.join(" ")} />"
21
+ end
22
+
23
+ def check_box_tag(object, name, options = {})
24
+ value = nil
25
+ value = options.delete(:value) if options[:value]
26
+ value = object.send name if object && object.respond_to?(name)
27
+ attr = []
28
+ options.each do |key, val|
29
+ attr << "#{key}='#{val}'"
30
+ end
31
+ "<input id='#{object.form_name}_#{name.to_s}' type='checkbox' name='#{object.form_name}[#{name.to_s}]' #{'checked="checked"' if value} value='1' #{attr.join(" ")} />"
32
+ end
33
+
34
+ def label_tag(object, name, label, options = {})
35
+ attr = []
36
+ options.each do |key, val|
37
+ attr << "#{key}='#{val}'"
38
+ end
39
+ "<label for='#{object.form_name}_#{name.to_s}' #{attr.join(" ")}>#{label}</label>"
40
+ end
41
+
42
+ def select_tag(object, name, options_array, options = {})
43
+ value = nil
44
+ value = options.delete(:value) if options[:value]
45
+ value = object.send name if object && object.respond_to?(name)
46
+ attr = []
47
+ options.each do |key, val|
48
+ attr << "#{key}='#{val}'"
49
+ end
50
+ select_tag = []
51
+ select_tag << "<select id='#{object.form_name}_#{name.to_s}' name='#{object.form_name}[#{name.to_s}]' #{attr.join(" ")}>"
52
+ options_array.each do |val|
53
+ select_tag << "<option value='#{val}' #{"selected='selected'" if value && val.to_s == value}>#{val}</option>"
54
+ end
55
+ select_tag << "</select>"
56
+ select_tag.join("\n")
21
57
  end
22
58
 
23
59
  end
@@ -21,12 +21,7 @@
21
21
  </div> <!-- mainbox -->
22
22
  </div> <!-- wrapper -->
23
23
  </div> <!-- content -->
24
-
25
- <div class="footer">
26
- <div class="wrapper">
27
- <p>Text</p>
28
- </div> <!-- wrapper -->
29
- </div> <!-- footer -->
24
+
30
25
  </div>
31
26
 
32
27
  </body>
@@ -8,18 +8,20 @@
8
8
  </a>
9
9
  </div>
10
10
  <div class="info">
11
- <span id="tail_logs_time"></span>
11
+ <span id="tail_logs_time" class="logs-time mrs"></span>
12
12
  <a id="tail_logs_stop_link" href="#" class="button negative mts mrs">
13
13
  <span class="stop">Stop</span>
14
14
  </a>
15
15
  </div>
16
16
  </div>
17
17
  </div> <!-- unit-right -->
18
+
19
+ <div id="ajax_loader"><img src="<%=u 'images/spinner.gif'%>" alt="loading..."></div>
18
20
  </div> <!-- topline -->
19
21
 
20
22
  <div class="outer">
21
23
  <div class="unit size3of4">
22
- <div class="filter phm pvs">
24
+ <div class="filter phm pvs" style="<%= 'display:block;' unless @filter.get_mongo_conditions.blank? %>">
23
25
  <form action="<%=h url_path("overview") %>" method="get" accept-charset="UTF-8">
24
26
  <div class="outer mvs">
25
27
  <div class="unit size1of3">
@@ -32,16 +34,18 @@
32
34
  <div class="prm">
33
35
  <%= text_field_tag @filter, :action, :placeholder => "Action" %>
34
36
  </div>
35
- </div>
37
+ </div>
36
38
  </div>
37
- <div class="unit size1of3">
39
+ <div class="unit size1of3">
38
40
  <div class="unit size1of2">
39
- <%#= select_tag @filter, :limit, :options => [100, 500, 1000, 2000, 5000, 10000] %>
40
- </div>
41
- </div>
42
- <div class="unit size1of3 txtR">
43
- <%= submit_tag :submit, "Filter", :class => "button primary" %>
44
- <a href="<%=h url_path("overview") %>" class="button small mls">Clear</a>
41
+ <%= label_tag @filter, :limit, "Limit of logs" %>
42
+ <%= select_tag @filter, :limit, [50, 100, 500, 1000, 2000, 5000, 10000] %>
43
+ </div> <!-- unit -->
44
+ <div class="unit size1of2">
45
+ <div class="plm">
46
+ <%= submit_tag :submit, "Filter", :class => "button primary" %>
47
+ </div> <!-- plm -->
48
+ </div> <!-- unit -->
45
49
  </div>
46
50
  </div> <!-- outer -->
47
51
  <div class="outer mvs">
@@ -60,36 +64,50 @@
60
64
  <div class="unit size1of3">
61
65
  <div class="unit size1of2">
62
66
  <div class="prm ptxs">
63
- <%#= f.check_box :is_exception %>
64
- <%#= f.label :is_exception, "Filter exceptions" %>
67
+ <%= check_box_tag @filter, :is_exception %>
68
+ <%= label_tag @filter, :is_exception, "Filter exceptions" %>
65
69
  </div>
66
70
  </div>
71
+ <div class="unit size1of2">
72
+ <div class="ptxs plm">
73
+ <a href="<%=h url_path("overview") %>">Clear</a>
74
+ </div> <!-- ptxs -->
75
+ </div> <!-- unit -->
67
76
  </div> <!-- unit -->
68
77
  </div> <!-- outer -->
69
78
  </form>
70
79
  </div> <!-- filter -->
71
80
 
72
- <div class="filter-toggle">
73
- Filter
74
- </div> <!-- filter-toggle -->
75
- <table id="logs_list">
76
- <tr>
77
- <th>Received</th>
78
- <th>Controller</th>
79
- <th>Action</th>
80
- <th>IP</th>
81
- <th>URL</th>
82
- <th>Runtime</th>
83
- </tr>
81
+ <div class="filter-toggle"><span class="arrow-down">Filter</span></div>
82
+
83
+ <% if @logs.count > 0 %>
84
+ <table id="logs_list">
85
+ <tr>
86
+ <th>Received</th>
87
+ <th>Controller</th>
88
+ <th>Action</th>
89
+ <th>IP</th>
90
+ <th>URL</th>
91
+ <th>Runtime</th>
92
+ </tr>
84
93
 
85
- <% @logs.each do |log| %>
86
- <%= partial(:"shared/log", :object => log) %>
87
- <% end %>
88
- </table>
94
+ <% @logs.each do |log| %>
95
+ <%= partial(:"shared/log", :object => log) %>
96
+ <% end %>
97
+ </table>
98
+ <% else %>
99
+ <div class="pale pal txtC">No logs found, try to filter out the other parameters</div>
100
+ <% end %>
89
101
  </div> <!-- unit size3of4 -->
90
102
 
91
103
  <div class="unit size1of4">
92
- <div id="log_info" class="details">
93
- </div>
104
+ <div class="details">
105
+
106
+ <div id="log_info">
107
+ <div class="pale h2 pal txtC">
108
+ Please choose log to see details
109
+ </div> <!-- pale h2 -->
110
+ </div>
111
+ </div> <!-- details -->
94
112
  </div> <!-- unit size1of4 -->
95
- </div> <!-- outer -->
113
+ </div> <!-- outer -->
@@ -1,5 +1,5 @@
1
1
  <tr class="log_info" data-url="<%=h url_path("log_info/#{log['_id']}") %>">
2
- <td><%=h log['request_time']%></td>
2
+ <td><span class="<%= log['is_exception'] ? "error" : "notice" %>"></span> <%=h log['request_time']%></td>
3
3
  <td><%=h log['controller']%></td>
4
4
  <td><%=h log['action']%></td>
5
5
  <td><%=h log['ip']%></td>
@@ -1,17 +1,17 @@
1
1
  <div class="pas">
2
2
  <div class="unit-right ptxs">
3
- <a href="<%=h url_path("log/#{log_info['_id']}") %>" target="_blank">Direct Link</a>
3
+ <a href="<%=h url_path("log/#{log_info['_id']}") %>" target="_blank">More Info</a>
4
4
  </div> <!-- unit-right -->
5
5
  <h2 class="phs mvs"><span class="<%= log_info['is_exception'] ? 'failure' : 'success' %>">Message</span></h2>
6
- <div class="phs">
6
+ <div class="phs wrap_text">
7
7
  <% if log_info['is_exception'] %>
8
- Error: <%= log_info['messages']['error'] %>
8
+ Error: <%= log_info['messages']['error'].join("\n").truncate(300, :separator => ' ') %>
9
9
  <% else %>
10
- Info: <%= log_info['messages']['info'] %>
10
+ Info: <%= log_info['messages']['info'].join("\n").truncate(300, :separator => ' ') %>
11
11
  <% end %>
12
12
  </div> <!-- phs -->
13
13
  <h2 class="phs mtm mbs">URL</h2>
14
- <div class="phs">
14
+ <div class="phs wrap_text">
15
15
  <%=h log_info['url']%>
16
16
  </div> <!-- phs -->
17
17
  <h2 class="phs mtm mbs">Received</h2>
@@ -53,9 +53,7 @@
53
53
  <span class="pale">Params:</span>
54
54
  </div> <!-- unit -->
55
55
  <div class="unit size4of5">
56
- <pre>
57
- <%=h @log['params'] %>
58
- </pre>
56
+ <code><%=h @log['params'] %></code>
59
57
  </div> <!-- unit -->
60
58
  </li>
61
59
  <% unless @log['messages']['error'].blank? %>
@@ -64,9 +62,7 @@
64
62
  <span class="pale">Error message:</span>
65
63
  </div> <!-- unit -->
66
64
  <div class="unit size4of5">
67
- <pre>
68
- <%=h @log['messages']['error'].join("\n") %>
69
- </pre>
65
+ <code><%=h @log['messages']['error'].join("\n") %></code>
70
66
  </div> <!-- unit -->
71
67
  </li>
72
68
  <% end %>
@@ -76,9 +72,7 @@
76
72
  <span class="pale">Info message:</span>
77
73
  </div> <!-- unit -->
78
74
  <div class="unit size4of5">
79
- <pre>
80
- <%=h @log['messages']['info'].join("\n") %>
81
- </pre>
75
+ <code><%=h @log['messages']['info'].join("\n") %></code>
82
76
  </div> <!-- unit -->
83
77
  </li>
84
78
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module MongodbLogger
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -18,15 +18,15 @@ Gem::Specification.new do |gem|
18
18
  gem.add_development_dependency "coffee-script", "~> 2.2.0"
19
19
  gem.add_development_dependency "therubyracer", "~> 0.9.9"
20
20
 
21
- gem.add_runtime_dependency "rake", "~> 0.9.0"
22
- gem.add_runtime_dependency "mongo", "~> 1.4.0"
23
- gem.add_runtime_dependency "bson_ext", "~> 1.4.0"
24
- gem.add_runtime_dependency "i18n", ">= 0.4.1"
25
- gem.add_runtime_dependency "json", "~> 1.6.1"
26
- gem.add_runtime_dependency "activesupport", ">= 3.0.0"
27
- gem.add_runtime_dependency "sinatra", ">= 1.2.0"
28
- gem.add_runtime_dependency "erubis", ">= 2.6.6"
29
- gem.add_runtime_dependency "vegas", "~> 0.1.2"
21
+ gem.add_dependency "rake", "~> 0.9.0"
22
+ gem.add_dependency "mongo", "~> 1.4.0"
23
+ gem.add_dependency "bson_ext", "~> 1.4.0"
24
+ gem.add_dependency "i18n", ">= 0.4.1"
25
+ gem.add_dependency "json", "~> 1.6.1"
26
+ gem.add_dependency "activesupport", ">= 3.0.0"
27
+ gem.add_dependency "sinatra", ">= 1.2.0"
28
+ gem.add_dependency "erubis", ">= 2.6.6"
29
+ gem.add_dependency "vegas", "~> 0.1.2"
30
30
 
31
31
  gem.rubyforge_project = "mongodb_logger"
32
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongodb_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-16 00:00:00.000000000 Z
12
+ date: 2011-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70100132933360 !ruby/object:Gem::Requirement
16
+ requirement: &70295289529900 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.7.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70100132933360
24
+ version_requirements: *70295289529900
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: shoulda
27
- requirement: &70100132931920 !ruby/object:Gem::Requirement
27
+ requirement: &70295293641700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70100132931920
35
+ version_requirements: *70295293641700
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mocha
38
- requirement: &70100132942920 !ruby/object:Gem::Requirement
38
+ requirement: &70295293638960 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.10.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70100132942920
46
+ version_requirements: *70295293638960
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: cucumber
49
- requirement: &70100132940840 !ruby/object:Gem::Requirement
49
+ requirement: &70295293636620 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.1.2
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70100132940840
57
+ version_requirements: *70295293636620
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: coffee-script
60
- requirement: &70100132954040 !ruby/object:Gem::Requirement
60
+ requirement: &70295293648740 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 2.2.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70100132954040
68
+ version_requirements: *70295293648740
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: therubyracer
71
- requirement: &70100132952500 !ruby/object:Gem::Requirement
71
+ requirement: &70295293644920 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.9.9
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70100132952500
79
+ version_requirements: *70295293644920
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rake
82
- requirement: &70100132950780 !ruby/object:Gem::Requirement
82
+ requirement: &70295293658320 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 0.9.0
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70100132950780
90
+ version_requirements: *70295293658320
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: mongo
93
- requirement: &70100132948020 !ruby/object:Gem::Requirement
93
+ requirement: &70295293656680 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.4.0
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70100132948020
101
+ version_requirements: *70295293656680
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: bson_ext
104
- requirement: &70100132960200 !ruby/object:Gem::Requirement
104
+ requirement: &70295293654000 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 1.4.0
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70100132960200
112
+ version_requirements: *70295293654000
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: i18n
115
- requirement: &70100132957100 !ruby/object:Gem::Requirement
115
+ requirement: &70295293651560 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 0.4.1
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70100132957100
123
+ version_requirements: *70295293651560
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: json
126
- requirement: &70100132980140 !ruby/object:Gem::Requirement
126
+ requirement: &70295293663080 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 1.6.1
132
132
  type: :runtime
133
133
  prerelease: false
134
- version_requirements: *70100132980140
134
+ version_requirements: *70295293663080
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: activesupport
137
- requirement: &70100132978380 !ruby/object:Gem::Requirement
137
+ requirement: &70295293674860 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 3.0.0
143
143
  type: :runtime
144
144
  prerelease: false
145
- version_requirements: *70100132978380
145
+ version_requirements: *70295293674860
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: sinatra
148
- requirement: &70100132977100 !ruby/object:Gem::Requirement
148
+ requirement: &70295293672400 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 1.2.0
154
154
  type: :runtime
155
155
  prerelease: false
156
- version_requirements: *70100132977100
156
+ version_requirements: *70295293672400
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: erubis
159
- requirement: &70100132975940 !ruby/object:Gem::Requirement
159
+ requirement: &70295293684200 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: 2.6.6
165
165
  type: :runtime
166
166
  prerelease: false
167
- version_requirements: *70100132975940
167
+ version_requirements: *70295293684200
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: vegas
170
- requirement: &70100132974300 !ruby/object:Gem::Requirement
170
+ requirement: &70295293682840 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ~>
@@ -175,7 +175,7 @@ dependencies:
175
175
  version: 0.1.2
176
176
  type: :runtime
177
177
  prerelease: false
178
- version_requirements: *70100132974300
178
+ version_requirements: *70295293682840
179
179
  description: MongoDB logger for Rails 3
180
180
  email:
181
181
  - leopard.not.a@gmail.com
@@ -212,10 +212,13 @@ files:
212
212
  - lib/mongodb_logger/server/coffee/application.coffee
213
213
  - lib/mongodb_logger/server/model/filter.rb
214
214
  - lib/mongodb_logger/server/partials.rb
215
- - lib/mongodb_logger/server/public/images/ajax-loader.gif
215
+ - lib/mongodb_logger/server/public/images/arrow-down.png
216
216
  - lib/mongodb_logger/server/public/images/failure.png
217
217
  - lib/mongodb_logger/server/public/images/logo.png
218
+ - lib/mongodb_logger/server/public/images/newlog.png
218
219
  - lib/mongodb_logger/server/public/images/play-icon.png
220
+ - lib/mongodb_logger/server/public/images/spinner.gif
221
+ - lib/mongodb_logger/server/public/images/spinner2.gif
219
222
  - lib/mongodb_logger/server/public/images/stop-icon.png
220
223
  - lib/mongodb_logger/server/public/images/success.png
221
224
  - lib/mongodb_logger/server/public/javascripts/application.js