logtail-rails 0.2.5 → 0.2.6

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: 97d938a7a8be17f755842dcf6625ea5cef8aee115de0e81a9a8d33722a16d2da
4
- data.tar.gz: fecfdfab18c9b31582a52987e5271c012707bc7a3cdcb628a261a204a4933c74
3
+ metadata.gz: 5832e8cb26c3fa1074500d631b899f379f5404decd1b6d2e1754412b84de1c2d
4
+ data.tar.gz: 4ac40078b3e30df1e5c95fe6cb44fb2d9ebec95c2663fdc6ab15e38d9fabaaca
5
5
  SHA512:
6
- metadata.gz: a1f6e1992c6d09df1df6649984d52d655671e4eb7bf031294e9e3eaf2edf7fc0cd5ae403ec42de01440e66fac99c36059b014207e56be0c2d072dd51a544e53a
7
- data.tar.gz: 63c827e685b29dce41f1c175972ef2eaf2e803ce7fedb771207fc5c3bc07e12c6edd7f9d3e53e32e71b9410d58de43ef3aa68b0d899b1434d1afffb198922995
6
+ metadata.gz: bd874966a740cb7c21e31c577481c28b611b0c3e25801480a29e2a754f1df20c0b3894dc44ae2e08f64ff98fa088364b4242e50e6fa408878c50824823301a89
7
+ data.tar.gz: f6ed0342a87e51d35e9a1750b3397b72f32676836a620e8c524001fcf03efe8c8966b2cab008982075ccc17066023eca727e42a71c4e6fe0dff74cc9bf66e02f
data/README.md CHANGED
@@ -1,97 +1,22 @@
1
- # Logtail - Ruby on Rails Logging Made Easy
2
-
3
- [![Logtail ruby dashboard](https://user-images.githubusercontent.com/19272921/154085622-59997d5a-3f91-4bc9-a815-3b8ead16d28d.jpeg)](https://betterstack.com/logtail)
1
+ # [Better Stack](https://betterstack.com/logs) Rails client
2
+
3
+ 📣 Logtail is now part of Better Stack. [Learn more ⇗](https://betterstack.com/press/introducing-better-stack/)
4
+
5
+ [![Better Stack dashboard](https://github.com/logtail/logtail-python/assets/10132717/e2a1196b-7924-4abc-9b85-055e17b5d499)](https://betterstack.com/logs)
4
6
 
5
7
  [![ISC License](https://img.shields.io/badge/license-ISC-ff69b4.svg)](LICENSE.md)
6
8
  [![Gem Version](https://badge.fury.io/rb/logtail-rails.svg)](https://badge.fury.io/rb/logtail-rails)
7
9
  [![Build Status](https://github.com/logtail/logtail-ruby-rails/actions/workflows/main.yml/badge.svg)](https://github.com/logtail/logtail-ruby-rails/actions/workflows/main.yml)
8
10
 
9
- Collect logs directly from your Ruby on Rails projects. To start logging Ruby projects explore the [Logtail Ruby library](https://github.com/logtail/logtail-ruby).
10
-
11
- [Logtail](https://betterstack.com/logtail) is a hosted service that centralizes all of your logs into one place. Allowing for analysis, correlation and filtering with SQL. Actionable Grafana dashboards and collaboration come built-in. Logtail works with [any language or platform and any data source](https://betterstack.com/docs/logs/).
12
-
13
- ### Features
14
- - Simple integration.
15
- - Support for structured logging and events.
16
- - Automatically captures useful context.
17
- - Performant, light weight, with a thoughtful design.
18
-
19
- ### Supported language versions
20
- - Ruby 2.5 or newer
21
- - Rails 5.0 or newer
22
-
23
- # Installation
24
- Install the Logtail Ruby on Rails client library, run the following command:
25
-
26
- ```bash
27
- bundle add logtail-rails
28
- ```
29
-
30
- Alternatively, add `gem "logtail-rails"` to your `Gemfile` manually and then run `bundle install`.
31
-
32
- Then add following configuration line into your `config/application.rb`:
33
-
34
- ```ruby
35
- module YourProject
36
- class Application < Rails::Application
37
- # ...
38
- # configuration of your project
39
- # ...
40
-
41
- config.logger = Logtail::Logger.create_default_logger("<SOURCE_TOKEN>")
42
- end
43
- end
44
- ```
45
-
46
- *Don't forget to replace `<SOURCE_TOKEN>` with your actual source token which you can find by going to [Better Stack Logs](https://logs.betterstack.com/dashboard) -> Source -> Edit.*
47
-
48
- ---
49
-
50
- # Example project
51
-
52
- To help you get started with using Logtail in your Ruby on Rails projects, we have prepared a simple program that showcases the usage of Logtail logger.
53
-
54
- ## Download and install the example project
55
-
56
- You can download the [example project](https://github.com/logtail/logtail-ruby-rails/tree/main/example-project) from GitHub directly or you can clone it to a select directory. Make sure you are in the projects directory and run the following command:
57
-
58
- ```bash
59
- bundle install
60
- ```
61
-
62
- This will install all dependencies listed in the `Gemfile.lock` file.
63
-
64
- Then replace `<SOURCE_TOKEN>` in `config/application.rb` with your actual source token which you can find by going to [Better Stack Logs](https://logs.betterstack.com/dashboard) -> Source -> Edit.
65
-
66
- ```ruby
67
- config.logger = Logtail::Logger.create_default_logger("<YOUR_ACTUAL_SOURCE_TOKEN>")
68
- ```
69
-
70
- ## Run the example project
71
-
72
- To run the example application, run the following command:
73
-
74
- ```bash
75
- rails server
76
- ```
77
-
78
- This will open a local server [127.0.0.1:3000.](http://127.0.0.1:3000/) On the main page, click the "Let's go!" button to generate test logs.
11
+ Experience SQL-compatible structured log management based on ClickHouse. [Learn more ](https://betterstack.com/logs)
79
12
 
80
- You should see the following output:
13
+ ## Documentation
81
14
 
82
- ```bash
83
- All done!
84
- Log into your Logtail account to check your logs.
85
- ```
15
+ [Getting started ⇗](https://betterstack.com/docs/logs/ruby-and-rails/#logging-from-rails)
86
16
 
87
- This will create a total of 6 different logs, each corresponding to a different log level and one with additional structured data. You can review these logs in Logtail.
17
+ ## Need help?
18
+ Please let us know at [hello@betterstack.com](mailto:hello@betterstack.com). We're happy to help!
88
19
 
89
- ## Explore how example project works
90
-
91
- Learn how to setup Ruby logging by exploring the workings of the [example project](https://github.com/logtail/logtail-ruby-rails/tree/main/example-project) in detail.
92
-
93
20
  ---
94
-
95
- ## Get in touch
96
21
 
97
- Have any questions? Please explore the Better Stack [documentation](https://betterstack.com/docs/logs/) or contact our [support](https://betterstack.com/help).
22
+ [ISC license](https://github.com/logtail/logtail-ruby-rails/blob/main/LICENSE.md), [example project](https://github.com/logtail/logtail-ruby-rails/tree/main/example-project)
@@ -71,4 +71,4 @@ group :test do
71
71
  gem "webdrivers"
72
72
  end
73
73
 
74
- gem "logtail-rails", "~> 0.2.5"
74
+ gem "logtail-rails", "~> 0.2.6"
@@ -19,6 +19,6 @@ module ExampleProject
19
19
  # config.time_zone = "Central Time (US & Canada)"
20
20
  # config.eager_load_paths << Rails.root.join("extras")
21
21
 
22
- config.logger = Logtail::Logger.create_default_logger("YhLXLk5djXYbxK16moYEhjeu")
22
+ config.logger = Logtail::Logger.create_default_logger("<SOURCE_TOKEN>")
23
23
  end
24
24
  end
@@ -17,11 +17,12 @@ module Logtail
17
17
  end
18
18
 
19
19
  # Logtail::Logger also works as ActiveSupport::BroadcastLogger
20
- def is_a?(clazz)
21
- return true if clazz == ::ActiveSupport::BroadcastLogger
20
+ def kind_of?(clazz)
21
+ return true if defined?(::ActiveSupport::BroadcastLogger) && clazz == ::ActiveSupport::BroadcastLogger
22
22
 
23
23
  super(clazz)
24
24
  end
25
+ alias is_a? kind_of?
25
26
 
26
27
  def broadcasts
27
28
  [self] + @extra_loggers
@@ -1,7 +1,7 @@
1
1
  module Logtail
2
2
  module Integrations
3
3
  module Rails
4
- VERSION = "0.2.5"
4
+ VERSION = "0.2.6"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logtail-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Better Stack
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-24 00:00:00.000000000 Z
11
+ date: 2023-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logtail
@@ -361,7 +361,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
361
361
  - !ruby/object:Gem::Version
362
362
  version: '0'
363
363
  requirements: []
364
- rubygems_version: 3.3.7
364
+ rubygems_version: 3.4.10
365
365
  signing_key:
366
366
  specification_version: 4
367
367
  summary: Better Stack Rails integration