loggerstash 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +26 -23
- data/.gitignore +0 -9
- data/.rubocop.yml +0 -5
- data/lib/loggerstash.rb +6 -3
- data/loggerstash.gemspec +3 -4
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d39439e76c2953faa8dace7d2fe630d79f9e492ff206ebc1631417993fd191a
|
4
|
+
data.tar.gz: 0bf51ec28020039b3ae864a03be3403caa7c2d84c73b236f003184827c37a1c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efe6185c0427be6761ae1661e64d288667d91e6cb00fa1fbb276d942216fdd7e14ada8d8122523b64c51d542ca8e26303b1ec94d3d978122ca452371b90d9e16
|
7
|
+
data.tar.gz: 393bfa2235d52e84fac15bab45229e80c9e5b3264e67d23078f09540a47343102d7c4e3e2cf87f7242d89d2e0bf5574e4b456f78cccde39cec7a74aae72c1da5
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,47 +1,50 @@
|
|
1
|
-
|
2
|
-
name: Loggerstash Tests
|
1
|
+
name: CI
|
3
2
|
|
4
|
-
|
3
|
+
on:
|
5
4
|
pull_request:
|
6
5
|
push:
|
7
6
|
branches:
|
8
7
|
- master
|
9
|
-
|
10
|
-
- v*
|
8
|
+
- main
|
11
9
|
|
12
10
|
jobs:
|
13
11
|
build:
|
14
12
|
runs-on: ubuntu-latest
|
15
|
-
|
13
|
+
|
16
14
|
strategy:
|
17
15
|
matrix:
|
18
|
-
ruby:
|
16
|
+
ruby:
|
17
|
+
- 2.5
|
18
|
+
- 2.6
|
19
|
+
- 2.7
|
20
|
+
- 3.0
|
21
|
+
|
19
22
|
steps:
|
20
23
|
- uses: actions/checkout@v2
|
21
|
-
|
24
|
+
|
25
|
+
- name: Setup ruby
|
26
|
+
uses: ruby/setup-ruby@v1
|
22
27
|
with:
|
23
28
|
ruby-version: ${{ matrix.ruby }}
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
restore-keys: |
|
30
|
-
${{ runner.os }}-${{ matrix.ruby }}-gems-
|
31
|
-
- name: Setup gems
|
32
|
-
run: |
|
33
|
-
bundle config path vendor/bundle
|
34
|
-
bundle install --jobs 4
|
29
|
+
bundler-cache: true
|
30
|
+
|
31
|
+
- name: Lint
|
32
|
+
run: bundle exec rubocop
|
33
|
+
|
35
34
|
- name: Tests
|
36
|
-
run: bundle exec rake
|
35
|
+
run: bundle exec rake test
|
37
36
|
|
38
37
|
publish:
|
39
|
-
if:
|
38
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
|
40
39
|
needs: build
|
41
40
|
runs-on: ubuntu-latest
|
41
|
+
|
42
42
|
steps:
|
43
43
|
- uses: actions/checkout@v2
|
44
|
+
|
44
45
|
- name: Release Gem
|
45
|
-
uses: discourse/publish-rubygems-action@
|
46
|
+
uses: discourse/publish-rubygems-action@v2-beta
|
46
47
|
env:
|
47
|
-
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
48
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
49
|
+
GIT_EMAIL: team@discourse.org
|
50
|
+
GIT_NAME: discoursebot
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/lib/loggerstash.rb
CHANGED
@@ -165,9 +165,12 @@ class Loggerstash
|
|
165
165
|
caller = caller_locations.find { |loc| ! [__FILE__, logger_filename].include? loc.absolute_path }
|
166
166
|
|
167
167
|
{
|
168
|
-
"@timestamp":
|
169
|
-
"@metadata":
|
170
|
-
|
168
|
+
"@timestamp": t.utc.strftime("%FT%T.%NZ"),
|
169
|
+
"@metadata": { event_type: "loggerstash" },
|
170
|
+
ecs: {
|
171
|
+
version: "1.8"
|
172
|
+
},
|
173
|
+
message: m,
|
171
174
|
log: {
|
172
175
|
level: s.downcase,
|
173
176
|
logger: "Loggerstash",
|
data/loggerstash.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "loggerstash"
|
5
5
|
|
6
|
-
s.version = "1.0
|
6
|
+
s.version = "1.1.0"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
|
9
9
|
s.summary = "Monkeypatch Logger to send log entries to logstash"
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.files = `git ls-files -z`.split("\0").reject { |f| f =~ /^(G|spec|Rakefile)/ }
|
21
21
|
|
22
|
-
s.required_ruby_version = ">= 2.
|
22
|
+
s.required_ruby_version = ">= 2.5.0"
|
23
23
|
|
24
24
|
s.add_runtime_dependency "logstash_writer", ">= 0.0.11"
|
25
25
|
|
@@ -27,10 +27,9 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_development_dependency 'guard-rspec'
|
28
28
|
s.add_development_dependency 'guard-rubocop'
|
29
29
|
s.add_development_dependency 'rack-test'
|
30
|
-
s.add_development_dependency 'rake', "~>
|
30
|
+
s.add_development_dependency 'rake', "~> 13.0"
|
31
31
|
s.add_development_dependency 'redcarpet'
|
32
32
|
s.add_development_dependency 'rspec'
|
33
|
-
s.add_development_dependency 'rubocop'
|
34
33
|
s.add_development_dependency 'rubocop-discourse'
|
35
34
|
s.add_development_dependency 'simplecov'
|
36
35
|
s.add_development_dependency 'yard'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loggerstash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Brown
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash_writer
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '13.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '13.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: redcarpet
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: rubocop-discourse
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,14 +196,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
210
196
|
requirements:
|
211
197
|
- - ">="
|
212
198
|
- !ruby/object:Gem::Version
|
213
|
-
version: 2.
|
199
|
+
version: 2.5.0
|
214
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
201
|
requirements:
|
216
202
|
- - ">="
|
217
203
|
- !ruby/object:Gem::Version
|
218
204
|
version: '0'
|
219
205
|
requirements: []
|
220
|
-
rubygems_version: 3.
|
206
|
+
rubygems_version: 3.1.4
|
221
207
|
signing_key:
|
222
208
|
specification_version: 4
|
223
209
|
summary: Monkeypatch Logger to send log entries to logstash
|