logtail 0.1.8 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4de48b70abbe9cebd9186345e9d410dd6021d53eaeaa9b204e10a364235e5088
4
- data.tar.gz: df85920aa4c0f0c91b560816e4f57e4038bc7abf9035410264b134bad26ab9c7
3
+ metadata.gz: b7ad98029314cd53d6824adf57c97eeb24b44aa4bc432ff1622e0dd9b2e07b9f
4
+ data.tar.gz: 6143a7a066580bc22e4960686919cc0a58ec934a1c3b8bcf193139944723ad55
5
5
  SHA512:
6
- metadata.gz: 3edf710be0595d057760e455787ee3b457a84d6e1ac998785a89f06693e05a33cf2c5b7043d133c6e61da732ea0c05a96f11990749455f118c6ca2c80ae19440
7
- data.tar.gz: 296e2a96d9f98c4bd11e9f3148524a902104b8fd3d2f0b2ed1482033f2aadf87516093356b1cbf671e3f07c32fd41b7f1ab430d8db648d4e9e06eb2a4e839568
6
+ metadata.gz: 19b97528678d45d109a50289666003fda062598f17606cc1093fc20b880e7567c8de91631ae4b12850b430999293e45d1d129783066af892e6699024ddc24090
7
+ data.tar.gz: d2dcc91d791fe9d325e1abae949f0b5430114790fea7ee5e602b0ee4241f66fc5a8b4904baaa26b3abb4c1bb04e435749e03e324f0b6a23496abbc01d87d0d8a
@@ -10,6 +10,8 @@ jobs:
10
10
  strategy:
11
11
  matrix:
12
12
  ruby-version:
13
+ - 3.2.1
14
+ - 3.1.2
13
15
  - 3.0.0
14
16
  - 2.7.2
15
17
  - 2.6.6
data/README.md CHANGED
@@ -51,7 +51,7 @@ This will install all dependencies listed in the `Gemfile.lock` file.
51
51
  To run the example application, run the following command:
52
52
 
53
53
  ```bash
54
- ruby main.rb <source-token>
54
+ bundle exec ruby main.rb <source-token>
55
55
  ```
56
56
 
57
57
  *Don't forget to replace `<source-token>` with your actual source token which you can find by going to logtail.com -> sources -> edit.*
@@ -1,9 +1,9 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- logtail (0.1.7)
4
+ logtail (0.1.9)
5
5
  msgpack (~> 1.0)
6
- msgpack (1.4.4)
6
+ msgpack (1.7.1)
7
7
 
8
8
  PLATFORMS
9
9
  ruby
@@ -21,7 +21,7 @@ Alternatively, add `gem "logtail"` to your `Gemfile` manually and then run `bund
21
21
  To run the example application, run the following command adding your source token:
22
22
 
23
23
  ```bash
24
- ruby main.rb <source-token>
24
+ bundle exec ruby main.rb <source-token>
25
25
  ```
26
26
 
27
27
  This will create a total of 5 different logs, each corresponding to a different log level. You can review these logs in Logtail.
@@ -8,7 +8,7 @@ require "logtail"
8
8
 
9
9
  # Check for program arguments
10
10
  if ARGV.length != 1
11
- puts "Program needs source token to run. Run the program as followed\nruby main.rb <source-token>"
11
+ puts "Program needs source token to run. Run the program as followed\nbundle exec ruby main.rb <source-token>"
12
12
  exit
13
13
  end
14
14
  # Create logger
@@ -37,6 +37,6 @@ logger.warn(
37
37
  logger.error("Oops! An error occurred!")
38
38
 
39
39
  # Send messages about fatal events that caused the app to crash using the fatal() method
40
- logger.fatal("Application crash! Needs to be fixed ASP!")
40
+ logger.fatal("Application crash! Needs to be fixed ASAP!")
41
41
 
42
42
  puts "All done! You can check your logs now."
@@ -57,6 +57,10 @@ module Logtail
57
57
 
58
58
  # Because of all the crazy ways Rails has attempted tags, we need this crazy method.
59
59
  def extract_active_support_tagged_logging_tags
60
+ if defined?(ActiveSupport::IsolatedExecutionState)
61
+ @current_tags ||= ActiveSupport::IsolatedExecutionState[tagged_logging_object_key_name]
62
+ end
63
+
60
64
  @current_tags ||
61
65
  Thread.current[:activesupport_tagged_logging_tags] ||
62
66
  Thread.current[tagged_logging_object_key_name] ||
@@ -188,6 +192,8 @@ module Logtail
188
192
  Logtail::Config.instance.debug { "Logtail::Logger instantiated, level: #{level}, formatter: #{formatter.class}" }
189
193
 
190
194
  @initialized = true
195
+
196
+ at_exit { self.close }
191
197
  end
192
198
 
193
199
  # Sets a new formatted on the logger.
@@ -1,3 +1,3 @@
1
1
  module Logtail
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.10"
3
3
  end
data/logtail.gemspec CHANGED
@@ -6,12 +6,12 @@ Gem::Specification.new do |spec|
6
6
  spec.name = "logtail"
7
7
  spec.version = Logtail::VERSION
8
8
  spec.platform = Gem::Platform::RUBY
9
- spec.authors = ["Logtail"]
10
- spec.email = ["hi@logtail.com"]
9
+ spec.authors = ["Better Stack"]
10
+ spec.email = ["hello@betterstack.com"]
11
11
  spec.homepage = "https://github.com/logtail/logtail-ruby"
12
12
  spec.license = "ISC"
13
13
 
14
- spec.summary = "Query logs like you query your database. https://logtail.com"
14
+ spec.summary = "Query logs like you query your database. https://logs.betterstack.com/"
15
15
 
16
16
  spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
17
17
  spec.metadata["changelog_uri"] = "#{spec.homepage}/tree/master/CHANGELOG.md"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logtail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
- - Logtail
7
+ - Better Stack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-16 00:00:00.000000000 Z
11
+ date: 2023-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack
@@ -138,7 +138,7 @@ dependencies:
138
138
  version: '0'
139
139
  description:
140
140
  email:
141
- - hi@logtail.com
141
+ - hello@betterstack.com
142
142
  executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
@@ -226,7 +226,7 @@ requirements: []
226
226
  rubygems_version: 3.3.7
227
227
  signing_key:
228
228
  specification_version: 4
229
- summary: Query logs like you query your database. https://logtail.com
229
+ summary: Query logs like you query your database. https://logs.betterstack.com/
230
230
  test_files:
231
231
  - spec/README.md
232
232
  - spec/logtail/current_context_spec.rb