Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Then replace `<SOURCE_TOKEN>` and `<INGESTING_HOST>` in `config/application.rb`
```ruby
config.logger = Logtail::Logger.create_default_logger(
"<YOUR_ACTUAL_SOURCE_TOKEN>",
telemetry_host: "in.logs.betterstack.com",
ingesting_host: "in.logs.betterstack.com",
)
```

Expand Down
2 changes: 1 addition & 1 deletion example-project/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Application < Rails::Application

config.logger = Logtail::Logger.create_default_logger(
"<SOURCE_TOKEN>",
telemetry_host: "<INGESTING_HOST>",
ingesting_host: "<INGESTING_HOST>",
)
end
end
8 changes: 4 additions & 4 deletions lib/logtail-rails/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ def self.create_logger(*io_devices_and_loggers)
end

def self.create_default_logger(source_token, options = {})
# Handle backward-compatibility of argument names
options[:logtail_host] ||= options[:telemetry_host] if options[:telemetry_host].present?
options[:logtail_port] ||= options[:telemetry_port] if options[:telemetry_port].present?
options[:logtail_scheme] ||= options[:telemetry_scheme] if options[:telemetry_scheme].present?
# Handle backward-compatibility of argument names from v0.2.9
options[:ingesting_host] ||= options[:telemetry_host] if options[:telemetry_host].present?
options[:ingesting_port] ||= options[:telemetry_port] if options[:telemetry_port].present?
options[:ingesting_scheme] ||= options[:telemetry_scheme] if options[:telemetry_scheme].present?

if ENV['LOGTAIL_SKIP_LOGS'].blank? && !Rails.env.test?
io_device = Logtail::LogDevices::HTTP.new(source_token, options)
Expand Down
2 changes: 1 addition & 1 deletion lib/logtail-rails/overrides/lograge.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Logtail and lograge are not compatible installed together. Using lograge
# with the Logtail.com *service* is perfectly fine, but not with the Logtail *gem*.
# with the Better Stack Telemetry *service* is perfectly fine, but not with the Logtail *gem*.
#
# Logtail does ship with a {Logtail::Config#logrageify!} option that configures
# Logtail to behave similarly to Lograge (silencing various logs). Check out
Expand Down
2 changes: 1 addition & 1 deletion logtail-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_runtime_dependency "logtail", "~> 0.1"
spec.add_runtime_dependency "logtail", "~> 0.1", ">= 0.1.14"
spec.add_runtime_dependency "logtail-rack", "~> 0.1"

spec.add_runtime_dependency 'activerecord', '>= 5.0.0'
Expand Down
Loading