td-logger 0.3.25 → 0.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +44 -0
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/ChangeLog +14 -0
- data/README.rdoc +11 -4
- data/VERSION +1 -1
- data/lib/td/logger/agent/rails/config.rb +2 -2
- data/lib/td/logger/agent/rails/yaml.rb +8 -0
- data/lib/td/logger/version.rb +1 -1
- data/spec/td/logger/treasure_data_logger_spec.rb +1 -1
- data/td-logger.gemspec +10 -4
- metadata +33 -44
- data/.travis.yml +0 -31
- data/appveyor.yml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c8d82284d5c496c5a78ebe21849f7460505b14b16017b059559dcbbcae6da0be
|
4
|
+
data.tar.gz: 4659ee78358501bd3d79ba75938668b5c854fcc333e92c5194f0675b87cc38a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08b999bb71891b3b4474693b3ec0954a9d71308b497d130dfa85e8f5e31a927cd57bdada7c32c73d4042d6132ffc872b0a4279bb867487bf8cc2b5cd91fae8df'
|
7
|
+
data.tar.gz: 46f0313dde88022116aff652481a7acb266d8e7cc53053c48cae0c31fc4fad6769aa9ad8618ecff79f5e112296059a4750a3b38ddaae46beb4d3d0b8a4e480b3
|
@@ -0,0 +1,44 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
test:
|
8
|
+
runs-on: ${{ matrix.os }}
|
9
|
+
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
os:
|
13
|
+
- ubuntu-latest
|
14
|
+
ruby:
|
15
|
+
- 2.3.1
|
16
|
+
- 2.4.1
|
17
|
+
- 2.5.9
|
18
|
+
- 2.6.9
|
19
|
+
- 2.7.5
|
20
|
+
- 3.0.3
|
21
|
+
- 3.1.0
|
22
|
+
- head
|
23
|
+
# TODO: Add jruby
|
24
|
+
include:
|
25
|
+
- os: windows-latest
|
26
|
+
ruby: 2.7.5
|
27
|
+
- os: macos-latest
|
28
|
+
ruby: 2.7.5
|
29
|
+
|
30
|
+
|
31
|
+
steps:
|
32
|
+
- uses: actions/checkout@v2
|
33
|
+
- name: Set up Ruby
|
34
|
+
uses: ruby/setup-ruby@v1
|
35
|
+
with:
|
36
|
+
ruby-version: ${{ matrix.ruby }}
|
37
|
+
|
38
|
+
- name: Install dependencies
|
39
|
+
run: |
|
40
|
+
bundle config path vendor/bundle
|
41
|
+
bundle install --jobs 4 --retry 3
|
42
|
+
|
43
|
+
- name: Run tests
|
44
|
+
run: bundle exec rake spec
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
#
|
7
|
+
# ******** NOTE ********
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
+
# supported CodeQL languages.
|
11
|
+
#
|
12
|
+
name: "CodeQL"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ master ]
|
17
|
+
pull_request:
|
18
|
+
# The branches below must be a subset of the branches above
|
19
|
+
branches: [ master ]
|
20
|
+
schedule:
|
21
|
+
- cron: '39 1 * * 6'
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
analyze:
|
25
|
+
name: Analyze
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
permissions:
|
28
|
+
actions: read
|
29
|
+
contents: read
|
30
|
+
security-events: write
|
31
|
+
|
32
|
+
strategy:
|
33
|
+
fail-fast: false
|
34
|
+
matrix:
|
35
|
+
language: [ 'ruby' ]
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
38
|
+
|
39
|
+
steps:
|
40
|
+
- name: Checkout repository
|
41
|
+
uses: actions/checkout@v3
|
42
|
+
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
44
|
+
- name: Initialize CodeQL
|
45
|
+
uses: github/codeql-action/init@v1
|
46
|
+
with:
|
47
|
+
languages: ${{ matrix.language }}
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
52
|
+
|
53
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
54
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
55
|
+
- name: Autobuild
|
56
|
+
uses: github/codeql-action/autobuild@v1
|
57
|
+
|
58
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
59
|
+
# 📚 https://git.io/JvXDl
|
60
|
+
|
61
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
62
|
+
# and modify them (or add more) to build your code if your project
|
63
|
+
# uses a compiled language
|
64
|
+
|
65
|
+
#- run: |
|
66
|
+
# make bootstrap
|
67
|
+
# make release
|
68
|
+
|
69
|
+
- name: Perform CodeQL Analysis
|
70
|
+
uses: github/codeql-action/analyze@v1
|
data/ChangeLog
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
== 2022-06-23 version 0.3.28
|
2
|
+
|
3
|
+
* Support Ruby 3.1 (psych 4.0): Allow loading configuration files (tresure_data.yml) which have YAML aliases.
|
4
|
+
|
5
|
+
== 2017-04-26 version 0.3.27
|
6
|
+
|
7
|
+
* Allow td-client v1.x
|
8
|
+
|
9
|
+
|
10
|
+
== 2016-10-19 version 0.3.26
|
11
|
+
|
12
|
+
* Allow msgpack v1.x
|
13
|
+
|
14
|
+
|
1
15
|
== 2016-01-19 version 0.3.25
|
2
16
|
|
3
17
|
* can use unique_key when post td
|
data/README.rdoc
CHANGED
@@ -67,7 +67,7 @@ Please note that we recommend to use a write-only API key. To obtain one, please
|
|
67
67
|
|
68
68
|
When the 'agent' and 'tag' options are specified, the events are logged into the local td-agent daemon. Later on, the daemon uploads the event periodically to the cloud (app -> td-agent -> cloud).
|
69
69
|
|
70
|
-
This requires additional setup steps but lowers the memory and performance impact to your application processes. For the installation process, please look at
|
70
|
+
This requires additional setup steps but lowers the memory and performance impact to your application processes. For the installation process, please look at the section {"How to Install Treasure Agent?"}[https://docs.treasuredata.com/articles/td-agent#how-to-install-treasure-agent] on "Quickstart Guide".
|
71
71
|
|
72
72
|
NOTE: This configuration is not supported on PaaS platforms.
|
73
73
|
|
@@ -75,7 +75,15 @@ NOTE: This configuration is not supported on PaaS platforms.
|
|
75
75
|
agent: "localhost:24224"
|
76
76
|
tag: td.myapp
|
77
77
|
debug_mode: false
|
78
|
-
|
78
|
+
|
79
|
+
Alternatively, one can initialize the Ruby Logger module for indirect upload within the application:
|
80
|
+
|
81
|
+
TreasureData::Logger.open_agent('td.myapp',
|
82
|
+
:host => 'localhost',
|
83
|
+
:port => 24224)
|
84
|
+
|
85
|
+
The arguments of the 'open_agent' function correspond to the configuration option of the underlying {Fluentd Ruby Logger (fluent-logger-ruby)}[https://github.com/fluent/fluent-logger-ruby/] library.
|
86
|
+
|
79
87
|
== Logging events
|
80
88
|
|
81
89
|
You can log anytime using 'TD.event.post' method:
|
@@ -118,8 +126,7 @@ You can access the logger instance via TD.logger to check the status.
|
|
118
126
|
|
119
127
|
== Further Readings
|
120
128
|
|
121
|
-
If you have any problem, please
|
122
|
-
{Support Site}[http://help.treasure-data.com].
|
129
|
+
If you have any problem, please refer our {document site}[https://docs.treasuredata.com/].
|
123
130
|
|
124
131
|
== Copyright
|
125
132
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.28
|
@@ -121,12 +121,12 @@ module Agent::Rails
|
|
121
121
|
end
|
122
122
|
|
123
123
|
def load_yaml(path)
|
124
|
-
require 'yaml'
|
124
|
+
require 'td/logger/agent/rails/yaml'
|
125
125
|
require 'erb'
|
126
126
|
|
127
127
|
src = File.read(path)
|
128
128
|
yaml = ERB.new(src).result
|
129
|
-
YAML.
|
129
|
+
YAML.unsafe_load(yaml)
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
data/lib/td/logger/version.rb
CHANGED
@@ -6,7 +6,7 @@ describe TreasureData::Logger::TreasureDataLogger do
|
|
6
6
|
it 'with apikey' do
|
7
7
|
td = TreasureData::Logger::TreasureDataLogger.new('db1', :apikey => 'test_1')
|
8
8
|
expect(td.instance_variable_get(:@client).api.apikey).to eq('test_1')
|
9
|
-
expect(td.instance_variable_get(:@client).api.instance_variable_get(:@ssl)).to eq(
|
9
|
+
expect(td.instance_variable_get(:@client).api.instance_variable_get(:@ssl)).to eq(true)
|
10
10
|
end
|
11
11
|
|
12
12
|
it 'with apikey and use_ssl' do
|
data/td-logger.gemspec
CHANGED
@@ -24,17 +24,23 @@ EOF
|
|
24
24
|
#gem.homepage = %q{https://github.com/treasure-data/td-logger-ruby}
|
25
25
|
gem.description = %q{Treasure Data logging library}
|
26
26
|
gem.summary = gem.description
|
27
|
+
gem.licenses = ["Apache-2.0"]
|
27
28
|
|
28
29
|
gem.files = `git ls-files`.split("\n")
|
29
30
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
30
31
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
31
32
|
gem.require_paths = ['lib']
|
32
33
|
|
33
|
-
gem.add_dependency "msgpack",
|
34
|
-
gem.add_dependency "td-client", "
|
35
|
-
gem.add_dependency "fluent-logger", "
|
34
|
+
gem.add_dependency "msgpack", ">= 0.5.6", "< 2.0"
|
35
|
+
gem.add_dependency "td-client", ">= 0.8.66", "< 2.0"
|
36
|
+
gem.add_dependency "fluent-logger", ">= 0.5.0", "< 2.0"
|
36
37
|
gem.add_development_dependency 'rake', '>= 0.9.2'
|
37
38
|
gem.add_development_dependency 'rspec', '~> 3.0'
|
38
39
|
gem.add_development_dependency 'coveralls'
|
39
|
-
|
40
|
+
ruby_version = Gem::Version.new(RUBY_VERSION)
|
41
|
+
if ruby_version >= Gem::Version.new('2.2.2')
|
42
|
+
gem.add_development_dependency 'rack'
|
43
|
+
else
|
44
|
+
gem.add_development_dependency 'rack', '~> 1.0'
|
45
|
+
end
|
40
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -16,72 +16,60 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
20
|
-
- - "!="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.5.0
|
23
|
-
- - "!="
|
24
|
-
- !ruby/object:Gem::Version
|
25
|
-
version: 0.5.1
|
26
|
-
- - "!="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: 0.5.2
|
29
|
-
- - "!="
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version: 0.5.3
|
19
|
+
version: 0.5.6
|
32
20
|
- - "<"
|
33
21
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
22
|
+
version: '2.0'
|
35
23
|
type: :runtime
|
36
24
|
prerelease: false
|
37
25
|
version_requirements: !ruby/object:Gem::Requirement
|
38
26
|
requirements:
|
39
27
|
- - ">="
|
40
28
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
42
|
-
- - "!="
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: 0.5.0
|
45
|
-
- - "!="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 0.5.1
|
48
|
-
- - "!="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 0.5.2
|
51
|
-
- - "!="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 0.5.3
|
29
|
+
version: 0.5.6
|
54
30
|
- - "<"
|
55
31
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
32
|
+
version: '2.0'
|
57
33
|
- !ruby/object:Gem::Dependency
|
58
34
|
name: td-client
|
59
35
|
requirement: !ruby/object:Gem::Requirement
|
60
36
|
requirements:
|
61
|
-
- - "
|
37
|
+
- - ">="
|
62
38
|
- !ruby/object:Gem::Version
|
63
39
|
version: 0.8.66
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '2.0'
|
64
43
|
type: :runtime
|
65
44
|
prerelease: false
|
66
45
|
version_requirements: !ruby/object:Gem::Requirement
|
67
46
|
requirements:
|
68
|
-
- - "
|
47
|
+
- - ">="
|
69
48
|
- !ruby/object:Gem::Version
|
70
49
|
version: 0.8.66
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '2.0'
|
71
53
|
- !ruby/object:Gem::Dependency
|
72
54
|
name: fluent-logger
|
73
55
|
requirement: !ruby/object:Gem::Requirement
|
74
56
|
requirements:
|
75
|
-
- - "
|
57
|
+
- - ">="
|
76
58
|
- !ruby/object:Gem::Version
|
77
59
|
version: 0.5.0
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '2.0'
|
78
63
|
type: :runtime
|
79
64
|
prerelease: false
|
80
65
|
version_requirements: !ruby/object:Gem::Requirement
|
81
66
|
requirements:
|
82
|
-
- - "
|
67
|
+
- - ">="
|
83
68
|
- !ruby/object:Gem::Version
|
84
69
|
version: 0.5.0
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '2.0'
|
85
73
|
- !ruby/object:Gem::Dependency
|
86
74
|
name: rake
|
87
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,20 +127,20 @@ dependencies:
|
|
139
127
|
- !ruby/object:Gem::Version
|
140
128
|
version: '0'
|
141
129
|
description: Treasure Data logging library
|
142
|
-
email:
|
130
|
+
email:
|
143
131
|
executables: []
|
144
132
|
extensions: []
|
145
133
|
extra_rdoc_files: []
|
146
134
|
files:
|
147
135
|
- ".coveralls.yml"
|
136
|
+
- ".github/workflows/ci.yml"
|
137
|
+
- ".github/workflows/codeql-analysis.yml"
|
148
138
|
- ".gitignore"
|
149
|
-
- ".travis.yml"
|
150
139
|
- ChangeLog
|
151
140
|
- Gemfile
|
152
141
|
- README.rdoc
|
153
142
|
- Rakefile
|
154
143
|
- VERSION
|
155
|
-
- appveyor.yml
|
156
144
|
- config/heroku/treasure_data.yml
|
157
145
|
- lib/td-logger.rb
|
158
146
|
- lib/td/logger.rb
|
@@ -161,6 +149,7 @@ files:
|
|
161
149
|
- lib/td/logger/agent/rails/config.rb
|
162
150
|
- lib/td/logger/agent/rails/controller.rb
|
163
151
|
- lib/td/logger/agent/rails/model.rb
|
152
|
+
- lib/td/logger/agent/rails/yaml.rb
|
164
153
|
- lib/td/logger/event.rb
|
165
154
|
- lib/td/logger/td_logger.rb
|
166
155
|
- lib/td/logger/version.rb
|
@@ -172,10 +161,11 @@ files:
|
|
172
161
|
- spec/td/logger/treasure_data_logger_spec.rb
|
173
162
|
- spec/td/logger_spec.rb
|
174
163
|
- td-logger.gemspec
|
175
|
-
homepage:
|
176
|
-
licenses:
|
164
|
+
homepage:
|
165
|
+
licenses:
|
166
|
+
- Apache-2.0
|
177
167
|
metadata: {}
|
178
|
-
post_install_message:
|
168
|
+
post_install_message:
|
179
169
|
rdoc_options: []
|
180
170
|
require_paths:
|
181
171
|
- lib
|
@@ -190,9 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
180
|
- !ruby/object:Gem::Version
|
191
181
|
version: '0'
|
192
182
|
requirements: []
|
193
|
-
|
194
|
-
|
195
|
-
signing_key:
|
183
|
+
rubygems_version: 3.3.7
|
184
|
+
signing_key:
|
196
185
|
specification_version: 4
|
197
186
|
summary: Treasure Data logging library
|
198
187
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 1.9.3
|
5
|
-
- 2.0.0
|
6
|
-
- 2.1
|
7
|
-
- 2.2
|
8
|
-
- 2.3.0
|
9
|
-
- ruby-head
|
10
|
-
- rbx
|
11
|
-
- jruby-1.7.20
|
12
|
-
|
13
|
-
sudo: false
|
14
|
-
|
15
|
-
branches:
|
16
|
-
only:
|
17
|
-
- master
|
18
|
-
|
19
|
-
gemfile:
|
20
|
-
- Gemfile
|
21
|
-
|
22
|
-
script: bundle exec rake spec
|
23
|
-
|
24
|
-
matrix:
|
25
|
-
allow_failures:
|
26
|
-
- rvm: ruby-head
|
27
|
-
- rvm: rbx
|
28
|
-
- rvm: jruby-1.7.20
|
29
|
-
|
30
|
-
notifications:
|
31
|
-
webhooks: http://td-beda.herokuapp.com/travisci_callback
|
data/appveyor.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
---
|
2
|
-
version: "{build}"
|
3
|
-
clone_depth: 10
|
4
|
-
install:
|
5
|
-
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
6
|
-
- ruby --version
|
7
|
-
- gem --version
|
8
|
-
- gem install bundler --quiet --no-ri --no-rdoc
|
9
|
-
- bundler --version
|
10
|
-
- bundle install
|
11
|
-
build_script:
|
12
|
-
- bundle exec rake build
|
13
|
-
test_script:
|
14
|
-
- bundle exec rake spec
|
15
|
-
environment:
|
16
|
-
matrix:
|
17
|
-
- ruby_version: "22"
|