applicaster-logger 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
data/lib/applicaster/logger.rb
CHANGED
@@ -9,10 +9,10 @@ module Applicaster
|
|
9
9
|
class Formatter < ::Logger::Formatter
|
10
10
|
include LogStashLogger::TaggedLogging::Formatter
|
11
11
|
|
12
|
-
attr_accessor :
|
12
|
+
attr_accessor :default_fields
|
13
13
|
|
14
14
|
def initialize(options = {})
|
15
|
-
@
|
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
|
-
|
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)
|
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.
|
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-
|
12
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: logstash-logger
|