applicaster-logger 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,7 @@ module Applicaster
11
11
  {
12
12
  params: event.payload[:params].except('controller', 'action', 'format'),
13
13
  facility: "action_controller",
14
+ user_id: event.payload[:user_id],
14
15
  }
15
16
  end
16
17
  end
@@ -9,10 +9,10 @@ module Applicaster
9
9
  class Formatter < ::Logger::Formatter
10
10
  include LogStashLogger::TaggedLogging::Formatter
11
11
 
12
- attr_accessor :facility
12
+ attr_accessor :default_fields
13
13
 
14
14
  def initialize(options = {})
15
- @facility = options[:facility]
15
+ @default_fields = options.dup
16
16
  @datetime_format = nil
17
17
  end
18
18
 
@@ -40,7 +40,9 @@ module Applicaster
40
40
  event[:host] ||= HOST
41
41
  event[:application] ||= Rails.application.config.applicaster_logger.application_name
42
42
  event[:environment] ||= Rails.env
43
- event[:facility] ||= facility
43
+ default_fields.each do |field, value|
44
+ event[field] = value
45
+ end
44
46
 
45
47
  current_tags.each do |tag|
46
48
  event.tag(tag)
@@ -1,5 +1,5 @@
1
1
  module Applicaster
2
2
  module Logger
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: applicaster-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-12 00:00:00.000000000 Z
12
+ date: 2014-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: logstash-logger