semantic_logger 4.6.1 → 4.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -7
- data/lib/semantic_logger.rb +23 -22
- data/lib/semantic_logger/appender.rb +32 -33
- data/lib/semantic_logger/appender/async.rb +9 -8
- data/lib/semantic_logger/appender/async_batch.rb +4 -2
- data/lib/semantic_logger/appender/bugsnag.rb +43 -30
- data/lib/semantic_logger/appender/elasticsearch.rb +10 -10
- data/lib/semantic_logger/appender/elasticsearch_http.rb +4 -4
- data/lib/semantic_logger/appender/file.rb +2 -1
- data/lib/semantic_logger/appender/graylog.rb +12 -10
- data/lib/semantic_logger/appender/honeybadger.rb +3 -3
- data/lib/semantic_logger/appender/http.rb +20 -18
- data/lib/semantic_logger/appender/kafka.rb +5 -5
- data/lib/semantic_logger/appender/mongodb.rb +6 -6
- data/lib/semantic_logger/appender/new_relic.rb +2 -2
- data/lib/semantic_logger/appender/rabbitmq.rb +5 -5
- data/lib/semantic_logger/appender/sentry.rb +7 -7
- data/lib/semantic_logger/appender/splunk.rb +5 -5
- data/lib/semantic_logger/appender/splunk_http.rb +4 -4
- data/lib/semantic_logger/appender/syslog.rb +20 -14
- data/lib/semantic_logger/appender/tcp.rb +5 -5
- data/lib/semantic_logger/appender/udp.rb +2 -2
- data/lib/semantic_logger/appenders.rb +11 -11
- data/lib/semantic_logger/base.rb +52 -23
- data/lib/semantic_logger/formatters.rb +11 -11
- data/lib/semantic_logger/formatters/base.rb +8 -3
- data/lib/semantic_logger/formatters/color.rb +10 -6
- data/lib/semantic_logger/formatters/default.rb +18 -5
- data/lib/semantic_logger/formatters/fluentd.rb +3 -3
- data/lib/semantic_logger/formatters/json.rb +1 -1
- data/lib/semantic_logger/formatters/raw.rb +31 -7
- data/lib/semantic_logger/formatters/signalfx.rb +10 -9
- data/lib/semantic_logger/formatters/syslog.rb +7 -6
- data/lib/semantic_logger/formatters/syslog_cee.rb +7 -6
- data/lib/semantic_logger/jruby/garbage_collection_logger.rb +4 -2
- data/lib/semantic_logger/levels.rb +9 -7
- data/lib/semantic_logger/log.rb +52 -60
- data/lib/semantic_logger/logger.rb +6 -8
- data/lib/semantic_logger/metric/new_relic.rb +3 -3
- data/lib/semantic_logger/metric/signalfx.rb +3 -3
- data/lib/semantic_logger/metric/statsd.rb +7 -7
- data/lib/semantic_logger/processor.rb +7 -5
- data/lib/semantic_logger/reporters/minitest.rb +4 -4
- data/lib/semantic_logger/semantic_logger.rb +24 -11
- data/lib/semantic_logger/subscriber.rb +6 -5
- data/lib/semantic_logger/sync.rb +12 -0
- data/lib/semantic_logger/sync_processor.rb +43 -0
- data/lib/semantic_logger/utils.rb +6 -6
- data/lib/semantic_logger/version.rb +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8023caa61e185f752a8e1cec7af81ce9a8570c5287df17a4a958fd313563363
|
4
|
+
data.tar.gz: 9a11150db987ee52f0e0ae7ac3a2ec7086a7f5430832510d64c10eb865444ac9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e366df7c3b382c412fd788aa567e9a88768d8e70beb14e60d08edc85554a041b511a26befe6a3e59e5759aefc27d2db6046a0fd97ce28b63befede5a68f64d34
|
7
|
+
data.tar.gz: 87d676b2fda89d82e8e329a10ac5df93e47af226d5da56073bd43f429fdb4f16019214948811f5d825193542cf71f5a09188ec63899b1083a20282ad92bd464e
|
data/Rakefile
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "rake/clean"
|
2
|
+
require "rake/testtask"
|
3
3
|
|
4
|
-
$LOAD_PATH.unshift File.expand_path(
|
5
|
-
require
|
4
|
+
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
|
5
|
+
require "semantic_logger/version"
|
6
6
|
|
7
7
|
task :gem do
|
8
|
-
system
|
8
|
+
system "gem build semantic_logger.gemspec"
|
9
9
|
end
|
10
10
|
|
11
11
|
task publish: :gem do
|
12
12
|
system "git tag -a v#{SemanticLogger::VERSION} -m 'Tagging #{SemanticLogger::VERSION}'"
|
13
|
-
system
|
13
|
+
system "git push --tags"
|
14
14
|
system "gem push semantic_logger-#{SemanticLogger::VERSION}.gem"
|
15
15
|
system "rm semantic_logger-#{SemanticLogger::VERSION}.gem"
|
16
16
|
end
|
17
17
|
|
18
18
|
Rake::TestTask.new(:test) do |t|
|
19
|
-
t.pattern =
|
19
|
+
t.pattern = "test/**/*_test.rb"
|
20
20
|
t.verbose = true
|
21
21
|
t.warning = false
|
22
22
|
end
|
data/lib/semantic_logger.rb
CHANGED
@@ -1,43 +1,44 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "semantic_logger/core_ext/thread"
|
2
|
+
require "semantic_logger/version"
|
3
3
|
|
4
4
|
# @formatter:off
|
5
5
|
module SemanticLogger
|
6
|
-
autoload :AnsiColors,
|
7
|
-
autoload :Appender,
|
8
|
-
autoload :Appenders,
|
9
|
-
autoload :Base,
|
10
|
-
autoload :DebugAsTraceLogger,
|
11
|
-
autoload :Formatters,
|
12
|
-
autoload :Levels,
|
13
|
-
autoload :Log,
|
14
|
-
autoload :Logger,
|
15
|
-
autoload :Loggable,
|
16
|
-
autoload :Processor,
|
17
|
-
autoload :Subscriber,
|
18
|
-
autoload :
|
6
|
+
autoload :AnsiColors, "semantic_logger/ansi_colors"
|
7
|
+
autoload :Appender, "semantic_logger/appender"
|
8
|
+
autoload :Appenders, "semantic_logger/appenders"
|
9
|
+
autoload :Base, "semantic_logger/base"
|
10
|
+
autoload :DebugAsTraceLogger, "semantic_logger/debug_as_trace_logger"
|
11
|
+
autoload :Formatters, "semantic_logger/formatters"
|
12
|
+
autoload :Levels, "semantic_logger/levels"
|
13
|
+
autoload :Log, "semantic_logger/log"
|
14
|
+
autoload :Logger, "semantic_logger/logger"
|
15
|
+
autoload :Loggable, "semantic_logger/loggable"
|
16
|
+
autoload :Processor, "semantic_logger/processor"
|
17
|
+
autoload :Subscriber, "semantic_logger/subscriber"
|
18
|
+
autoload :SyncProcessor, "semantic_logger/sync_processor"
|
19
|
+
autoload :Utils, "semantic_logger/utils"
|
19
20
|
|
20
21
|
module Concerns
|
21
|
-
autoload :Compatibility,
|
22
|
+
autoload :Compatibility, "semantic_logger/concerns/compatibility"
|
22
23
|
end
|
23
24
|
|
24
25
|
module Metric
|
25
|
-
autoload :NewRelic,
|
26
|
-
autoload :Signalfx,
|
27
|
-
autoload :Statsd,
|
26
|
+
autoload :NewRelic, "semantic_logger/metric/new_relic"
|
27
|
+
autoload :Signalfx, "semantic_logger/metric/signalfx"
|
28
|
+
autoload :Statsd, "semantic_logger/metric/statsd"
|
28
29
|
end
|
29
30
|
|
30
31
|
module Reporters
|
31
|
-
autoload :Minitest,
|
32
|
+
autoload :Minitest, "semantic_logger/reporters/minitest"
|
32
33
|
end
|
33
34
|
|
34
35
|
if defined?(JRuby)
|
35
36
|
module JRuby
|
36
|
-
autoload :GarbageCollectionLogger,
|
37
|
+
autoload :GarbageCollectionLogger, "semantic_logger/jruby/garbage_collection_logger"
|
37
38
|
end
|
38
39
|
end
|
39
40
|
end
|
40
|
-
require
|
41
|
+
require "semantic_logger/semantic_logger"
|
41
42
|
# @formatter:on
|
42
43
|
|
43
44
|
# Flush all appenders at exit, waiting for outstanding messages on the queue
|
@@ -1,47 +1,46 @@
|
|
1
1
|
module SemanticLogger
|
2
2
|
module Appender
|
3
3
|
# @formatter:off
|
4
|
-
autoload :Async,
|
5
|
-
autoload :AsyncBatch,
|
6
|
-
autoload :Bugsnag,
|
7
|
-
autoload :Elasticsearch,
|
8
|
-
autoload :ElasticsearchHttp,
|
9
|
-
autoload :File,
|
10
|
-
autoload :Graylog,
|
11
|
-
autoload :Honeybadger,
|
12
|
-
autoload :Kafka,
|
13
|
-
autoload :Sentry,
|
14
|
-
autoload :Http,
|
15
|
-
autoload :MongoDB,
|
16
|
-
autoload :NewRelic,
|
17
|
-
autoload :Rabbitmq,
|
18
|
-
autoload :Splunk,
|
19
|
-
autoload :SplunkHttp,
|
20
|
-
autoload :Syslog,
|
21
|
-
autoload :Tcp,
|
22
|
-
autoload :Udp,
|
23
|
-
autoload :Wrapper,
|
4
|
+
autoload :Async, "semantic_logger/appender/async"
|
5
|
+
autoload :AsyncBatch, "semantic_logger/appender/async_batch"
|
6
|
+
autoload :Bugsnag, "semantic_logger/appender/bugsnag"
|
7
|
+
autoload :Elasticsearch, "semantic_logger/appender/elasticsearch"
|
8
|
+
autoload :ElasticsearchHttp, "semantic_logger/appender/elasticsearch_http"
|
9
|
+
autoload :File, "semantic_logger/appender/file"
|
10
|
+
autoload :Graylog, "semantic_logger/appender/graylog"
|
11
|
+
autoload :Honeybadger, "semantic_logger/appender/honeybadger"
|
12
|
+
autoload :Kafka, "semantic_logger/appender/kafka"
|
13
|
+
autoload :Sentry, "semantic_logger/appender/sentry"
|
14
|
+
autoload :Http, "semantic_logger/appender/http"
|
15
|
+
autoload :MongoDB, "semantic_logger/appender/mongodb"
|
16
|
+
autoload :NewRelic, "semantic_logger/appender/new_relic"
|
17
|
+
autoload :Rabbitmq, "semantic_logger/appender/rabbitmq"
|
18
|
+
autoload :Splunk, "semantic_logger/appender/splunk"
|
19
|
+
autoload :SplunkHttp, "semantic_logger/appender/splunk_http"
|
20
|
+
autoload :Syslog, "semantic_logger/appender/syslog"
|
21
|
+
autoload :Tcp, "semantic_logger/appender/tcp"
|
22
|
+
autoload :Udp, "semantic_logger/appender/udp"
|
23
|
+
autoload :Wrapper, "semantic_logger/appender/wrapper"
|
24
24
|
# @formatter:on
|
25
25
|
|
26
26
|
# Returns [SemanticLogger::Subscriber] appender for the supplied options
|
27
27
|
def self.factory(async: false, batch: nil,
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
)
|
28
|
+
max_queue_size: 10_000, lag_check_interval: 1_000, lag_threshold_s: 30,
|
29
|
+
batch_size: 300, batch_seconds: 5,
|
30
|
+
**args,
|
31
|
+
&block)
|
33
32
|
appender = build(**args, &block)
|
34
33
|
|
35
34
|
# If appender implements #batch, then it should use the batch proxy by default.
|
36
|
-
batch
|
35
|
+
batch = true if batch.nil? && appender.respond_to?(:batch)
|
37
36
|
|
38
37
|
if batch == true
|
39
38
|
Appender::AsyncBatch.new(
|
40
|
-
appender:
|
41
|
-
max_queue_size:
|
42
|
-
lag_threshold_s:
|
43
|
-
batch_size:
|
44
|
-
batch_seconds:
|
39
|
+
appender: appender,
|
40
|
+
max_queue_size: max_queue_size,
|
41
|
+
lag_threshold_s: lag_threshold_s,
|
42
|
+
batch_size: batch_size,
|
43
|
+
batch_seconds: batch_seconds
|
45
44
|
)
|
46
45
|
elsif async == true
|
47
46
|
Appender::Async.new(
|
@@ -71,14 +70,14 @@ module SemanticLogger
|
|
71
70
|
end
|
72
71
|
elsif metric
|
73
72
|
if metric.is_a?(Symbol)
|
74
|
-
SemanticLogger::Utils.constantize_symbol(metric,
|
73
|
+
SemanticLogger::Utils.constantize_symbol(metric, "SemanticLogger::Metric").new(**args)
|
75
74
|
elsif metric.is_a?(Subscriber)
|
76
75
|
metric
|
77
76
|
else
|
78
77
|
raise(ArgumentError, "Parameter :metric must be either a Symbol or an object derived from SemanticLogger::Subscriber, not: #{appender.inspect}")
|
79
78
|
end
|
80
79
|
else
|
81
|
-
raise(ArgumentError,
|
80
|
+
raise(ArgumentError, "To create an appender it must supply one of the following: :io, :file_name, :appender, :metric, or :logger")
|
82
81
|
end
|
83
82
|
end
|
84
83
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "forwardable"
|
2
2
|
|
3
3
|
module SemanticLogger
|
4
4
|
module Appender
|
@@ -73,6 +73,7 @@ module SemanticLogger
|
|
73
73
|
# Starts the worker thread if not running.
|
74
74
|
def thread
|
75
75
|
return @thread if @thread&.alive?
|
76
|
+
|
76
77
|
@thread = Thread.new { process }
|
77
78
|
end
|
78
79
|
|
@@ -115,21 +116,21 @@ module SemanticLogger
|
|
115
116
|
# This thread is designed to never go down unless the main thread terminates
|
116
117
|
# or the appender is closed.
|
117
118
|
Thread.current.name = logger.name
|
118
|
-
logger.trace
|
119
|
+
logger.trace "Async: Appender thread active"
|
119
120
|
begin
|
120
121
|
process_messages
|
121
|
-
rescue StandardError =>
|
122
|
+
rescue StandardError => e
|
122
123
|
# This block may be called after the file handles have been released by Ruby
|
123
124
|
begin
|
124
|
-
logger.error(
|
125
|
+
logger.error("Async: Restarting due to exception", e)
|
125
126
|
rescue StandardError
|
126
127
|
nil
|
127
128
|
end
|
128
129
|
retry
|
129
|
-
rescue Exception =>
|
130
|
+
rescue Exception => e
|
130
131
|
# This block may be called after the file handles have been released by Ruby
|
131
132
|
begin
|
132
|
-
logger.error(
|
133
|
+
logger.error("Async: Stopping due to fatal exception", e)
|
133
134
|
rescue StandardError
|
134
135
|
nil
|
135
136
|
end
|
@@ -137,7 +138,7 @@ module SemanticLogger
|
|
137
138
|
@thread = nil
|
138
139
|
# This block may be called after the file handles have been released by Ruby
|
139
140
|
begin
|
140
|
-
logger.trace(
|
141
|
+
logger.trace("Async: Thread has stopped")
|
141
142
|
rescue StandardError
|
142
143
|
nil
|
143
144
|
end
|
@@ -159,7 +160,7 @@ module SemanticLogger
|
|
159
160
|
break unless process_message(message)
|
160
161
|
end
|
161
162
|
end
|
162
|
-
logger.trace
|
163
|
+
logger.trace "Async: Queue Closed"
|
163
164
|
end
|
164
165
|
|
165
166
|
# Returns false when message processing should be stopped
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "concurrent"
|
2
2
|
|
3
3
|
module SemanticLogger
|
4
4
|
module Appender
|
@@ -42,7 +42,9 @@ module SemanticLogger
|
|
42
42
|
lag_threshold_s: lag_threshold_s
|
43
43
|
)
|
44
44
|
|
45
|
-
|
45
|
+
return if appender.respond_to?(:batch)
|
46
|
+
|
47
|
+
raise(ArgumentError, "#{appender.class.name} does not support batching. It must implement #batch")
|
46
48
|
end
|
47
49
|
|
48
50
|
# Add log message for processing.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
begin
|
2
|
-
require
|
2
|
+
require "bugsnag"
|
3
3
|
rescue LoadError
|
4
|
-
raise LoadError
|
4
|
+
raise LoadError, 'Gem bugsnag is required for logging purposes. Please add the gem "bugsnag" to your Gemfile.'
|
5
5
|
end
|
6
6
|
|
7
7
|
# Send log messages to Bugsnag
|
@@ -30,7 +30,7 @@ module SemanticLogger
|
|
30
30
|
# Proc: Only include log messages where the supplied Proc returns true
|
31
31
|
# The Proc must return true or false.
|
32
32
|
def initialize(level: :error, **args, &block)
|
33
|
-
raise
|
33
|
+
raise "Bugsnag only supports :info, :warn, or :error log levels" unless %i[info warn error fatal].include?(level)
|
34
34
|
|
35
35
|
# Replace the Bugsnag logger so that we can identify its log messages and not forward them to Bugsnag
|
36
36
|
::Bugsnag.configure { |config| config.logger = SemanticLogger[Bugsnag] }
|
@@ -40,48 +40,61 @@ module SemanticLogger
|
|
40
40
|
|
41
41
|
# Returns [Hash] of parameters to send to Bugsnag.
|
42
42
|
def call(log, logger)
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
43
|
+
hash = SemanticLogger::Formatters::Raw.new.call(log, logger)
|
44
|
+
hash.delete(:message) if hash[:exception] && (hash[:message] == hash[:exception][:message])
|
45
|
+
hash.delete(:time)
|
46
|
+
hash.delete(:level_index)
|
47
|
+
hash.delete(:exception)
|
48
|
+
hash[:file] = "#{hash[:file]}:#{hash.delete(:line)}" if hash.key?(:file)
|
49
|
+
hash
|
49
50
|
end
|
50
51
|
|
51
|
-
# Send an error notification to Bugsnag
|
52
52
|
def log(log)
|
53
53
|
# Ignore logs coming from Bugsnag itself
|
54
|
-
return false if log.name ==
|
54
|
+
return false if log.name == "Bugsnag"
|
55
55
|
|
56
56
|
# Send error messages as Runtime exceptions
|
57
|
-
exception =
|
58
|
-
|
59
|
-
|
60
|
-
log.exception.set_backtrace(log.backtrace) if !log.exception.backtrace && log.backtrace
|
61
|
-
log.exception
|
62
|
-
else
|
63
|
-
error = RuntimeError.new(log.message)
|
64
|
-
error.set_backtrace(log.backtrace) if log.backtrace
|
65
|
-
error
|
66
|
-
end
|
67
|
-
|
68
|
-
# For more documentation on the Bugsnag.notify method see:
|
69
|
-
# https://bugsnag.com/docs/notifiers/ruby#sending-handled-exceptions
|
70
|
-
::Bugsnag.notify(exception, formatter.call(log, self))
|
57
|
+
exception = extract_exception(log)
|
58
|
+
hash = formatter.call(log, self)
|
59
|
+
bugsnag_notify(exception, hash, log_level(log.level))
|
71
60
|
true
|
72
61
|
end
|
73
62
|
|
74
63
|
private
|
75
64
|
|
65
|
+
def bugsnag_notify(exception, hash, level)
|
66
|
+
if ::Bugsnag::VERSION.to_i >= 6
|
67
|
+
::Bugsnag.notify(exception) do |report|
|
68
|
+
report.severity = level
|
69
|
+
hash.each_pair { |key, value| report.add_tab(key, value) }
|
70
|
+
end
|
71
|
+
else
|
72
|
+
hash[:severity] = level
|
73
|
+
::Bugsnag.notify(exception, hash)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def extract_exception(log)
|
78
|
+
if log.exception
|
79
|
+
# Manually constructed Exception, without a backtrace.
|
80
|
+
log.exception.set_backtrace(log.backtrace) if !log.exception.backtrace && log.backtrace
|
81
|
+
return log.exception
|
82
|
+
end
|
83
|
+
|
84
|
+
error = RuntimeError.new(log.message)
|
85
|
+
error.set_backtrace(log.backtrace) if log.backtrace
|
86
|
+
error
|
87
|
+
end
|
88
|
+
|
76
89
|
# Bugsnag supports: error, warning or info
|
77
|
-
def log_level(
|
78
|
-
case
|
90
|
+
def log_level(level)
|
91
|
+
case level
|
79
92
|
when :error, :fatal
|
80
|
-
|
93
|
+
"error"
|
81
94
|
when :warn
|
82
|
-
|
95
|
+
"warning"
|
83
96
|
else
|
84
|
-
|
97
|
+
"info"
|
85
98
|
end
|
86
99
|
end
|
87
100
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
begin
|
2
|
-
require
|
2
|
+
require "elasticsearch"
|
3
3
|
rescue LoadError
|
4
|
-
raise LoadError
|
4
|
+
raise LoadError, 'Gem elasticsearch is required for logging to Elasticsearch. Please add the gem "elasticsearch" to your Gemfile.'
|
5
5
|
end
|
6
6
|
|
7
|
-
require
|
7
|
+
require "date"
|
8
8
|
|
9
9
|
# Forward all log messages to Elasticsearch.
|
10
10
|
#
|
@@ -123,10 +123,10 @@ module SemanticLogger
|
|
123
123
|
# send_get_body_as [String]
|
124
124
|
# Specify the HTTP method to use for GET requests with a body.
|
125
125
|
# Default: 'GET'
|
126
|
-
def initialize(url:
|
127
|
-
index:
|
128
|
-
date_pattern:
|
129
|
-
type:
|
126
|
+
def initialize(url: "http://localhost:9200",
|
127
|
+
index: "semantic_logger",
|
128
|
+
date_pattern: "%Y.%m.%d",
|
129
|
+
type: "log",
|
130
130
|
level: nil,
|
131
131
|
formatter: nil,
|
132
132
|
filter: nil,
|
@@ -174,15 +174,15 @@ module SemanticLogger
|
|
174
174
|
|
175
175
|
def write_to_elasticsearch(messages)
|
176
176
|
bulk_result = @client.bulk(body: messages)
|
177
|
-
return unless bulk_result[
|
177
|
+
return unless bulk_result["errors"]
|
178
178
|
|
179
|
-
failed = bulk_result[
|
179
|
+
failed = bulk_result["items"].reject { |x| x["status"] == 201 }
|
180
180
|
logger.error("ElasticSearch: Write failed. Messages discarded. : #{failed}")
|
181
181
|
end
|
182
182
|
|
183
183
|
def bulk_index(log)
|
184
184
|
expanded_index_name = log.time.strftime("#{index}-#{date_pattern}")
|
185
|
-
{
|
185
|
+
{"index" => {"_index" => expanded_index_name, "_type" => type}}
|
186
186
|
end
|
187
187
|
|
188
188
|
def default_formatter
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "date"
|
2
2
|
# Forward all log messages to Elasticsearch one at a time via a HTTP post.
|
3
3
|
#
|
4
4
|
# Note:
|
@@ -50,9 +50,9 @@ module SemanticLogger
|
|
50
50
|
# application: [String]
|
51
51
|
# Name of this application to appear in log messages.
|
52
52
|
# Default: SemanticLogger.application
|
53
|
-
def initialize(index:
|
54
|
-
type:
|
55
|
-
url:
|
53
|
+
def initialize(index: "semantic_logger",
|
54
|
+
type: "log",
|
55
|
+
url: "http://localhost:9200",
|
56
56
|
**http_args,
|
57
57
|
&block)
|
58
58
|
|