logging-journald 2.0.3 → 2.1.0

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: 70c6d944488449ed543a68a668aa010d54d0c49e66f4d3f7008b85e4fe7d2719
4
- data.tar.gz: 6fc217f7a0176d7229de8943d9069bde218dfe735d1ebbe24f48c83c422cb5e1
3
+ metadata.gz: 1c1073e08a1cf5fe3678884c9f271abaa3c5e506f70d5eed91d4518d8784e50b
4
+ data.tar.gz: 2f2323e14d64fd33204d8a30806a4d8e320a00b017b270e6788d1601a98428d8
5
5
  SHA512:
6
- metadata.gz: ee7c77ba738ca78db16cd4bc45ce7538a03d803e11c0b5c63c40c9abb2e89bed3c41b0396c537f87011658ffd04579d1fcae823134ecf3ad122e58a4b13d9bb2
7
- data.tar.gz: 83512c9c72f3c3b9afc778c29ae6c8403bfdac1a6f6c91b5320cba71d17564271dd48db886444d4fba37ec848b0f36b92e1a83376cfcdcbf2375f25f05dd097f
6
+ metadata.gz: 285dcf8f95fa50fc41d11ec08412ca9dca309f699126a3b7c525fc4815f62694e2c04929c297741181578044fe5ee526c1e7e549cefe3141d7b62c90f9022b98
7
+ data.tar.gz: 29284a3d32ed0e3411382b7168ac818818e34c50d8585b5e6d179a6495d71e6c934f84198dd2f0737c8016b0a4124d20d28da406b70cb76ee1a02e2a41d9409a
@@ -1,11 +1,8 @@
1
1
  language: ruby
2
2
  before_install:
3
- - sudo apt-get install -y libsystemd-journal-dev
3
+ - sudo apt-get install -y libsystemd-dev
4
4
  install: "bundle install"
5
5
  script: "bundle exec rake"
6
6
  rvm:
7
- - 2.1.0
8
- - 2.2.0
9
- - 2.3.0
10
- - 2.4.0
11
-
7
+ - 2.0.0
8
+ - 2.6.0
@@ -1,27 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- logging-journald (1.0.0)
5
- journald-logger
4
+ logging-journald (2.0.3)
5
+ journald-logger (~> 3.0)
6
6
  logging
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- journald-logger (2.0.3)
11
+ journald-logger (3.0.0)
12
12
  journald-native (~> 1.0)
13
- journald-native (1.0.9)
13
+ journald-native (1.0.11)
14
14
  little-plugger (1.1.4)
15
15
  logging (2.2.2)
16
16
  little-plugger (~> 1.1)
17
17
  multi_json (~> 1.10)
18
- metaclass (0.0.4)
19
- mocha (1.3.0)
20
- metaclass (~> 0.0.1)
21
- multi_json (1.13.1)
22
- power_assert (1.1.1)
23
- rake (12.3.0)
24
- test-unit (3.2.7)
18
+ mocha (1.10.0)
19
+ multi_json (1.14.1)
20
+ power_assert (1.1.5)
21
+ rake (13.0.1)
22
+ test-unit (3.3.4)
25
23
  power_assert
26
24
 
27
25
  PLATFORMS
@@ -35,4 +33,4 @@ DEPENDENCIES
35
33
  test-unit
36
34
 
37
35
  BUNDLED WITH
38
- 1.15.3
36
+ 1.17.2
data/README.md CHANGED
@@ -38,7 +38,7 @@ log.add_appenders(Logging.appenders.journald('myservice'))
38
38
 
39
39
  # use mapped diagnostic context to send custom fields
40
40
  Logging.mdc['signed_user'] = 'Ondra'
41
- logger.debug "blah blah"
41
+ log.debug "blah blah"
42
42
  ```
43
43
 
44
44
  The example above will be rendered as:
@@ -82,7 +82,7 @@ module Logging
82
82
  else
83
83
  record[:message] = event
84
84
  end
85
- @journal.send(record)
85
+ @journal.send_message(record)
86
86
  self
87
87
  rescue StandardError => err
88
88
  self.level = :off
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'logging-journald'
3
- spec.version = '2.0.3'
3
+ spec.version = '2.1.0'
4
4
  spec.authors = ['Lukas Zapletal']
5
5
  spec.email = ['lukas-x@zapletalovi.com']
6
6
  spec.summary = "Journald appender for logging gem"
@@ -12,11 +12,13 @@ Gem::Specification.new do |spec|
12
12
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
13
13
  spec.require_paths = ['lib']
14
14
 
15
- spec.add_runtime_dependency 'journald-logger', '~> 2.0'
15
+ spec.required_ruby_version = ">= 2.0.0"
16
+
17
+ spec.add_runtime_dependency 'journald-logger', '~> 3.0'
16
18
  spec.add_runtime_dependency 'logging'
17
19
 
20
+ spec.add_development_dependency 'rake', '~> 11.0' # ruby 2.0
18
21
  spec.add_development_dependency 'bundler'
19
22
  spec.add_development_dependency 'mocha'
20
- spec.add_development_dependency 'rake'
21
23
  spec.add_development_dependency 'test-unit'
22
24
  end
@@ -32,69 +32,69 @@ module TestLogging
32
32
 
33
33
  def test_simple_debug_line
34
34
  setup_appender
35
- @appender.journal.expects(:send).with(has_entries(message: "test", priority: DEBUG)).once.returns(true)
35
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", priority: DEBUG)).once.returns(true)
36
36
  @log.debug "test"
37
37
  end
38
38
 
39
39
  def test_simple_debug_line_with_facility
40
40
  setup_appender facility: 10
41
- @appender.journal.expects(:send).with(has_entries(message: "test", SYSLOG_FACILITY: 10, priority: DEBUG)).once.returns(true)
41
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", SYSLOG_FACILITY: 10, priority: DEBUG)).once.returns(true)
42
42
  @log.debug "test"
43
43
  end
44
44
 
45
45
  def test_simple_debug_line_with_logger
46
46
  setup_appender logger_name: :lg
47
- @appender.journal.expects(:send).with(has_entries(message: "test", lg: 'test', priority: DEBUG)).once.returns(true)
47
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", lg: 'test', priority: DEBUG)).once.returns(true)
48
48
  @log.debug "test"
49
49
  end
50
50
 
51
51
  def test_simple_debug_line_level_info
52
52
  setup_appender
53
53
  @log.level = :info
54
- @appender.journal.expects(:send).with(has_entries(message: "test", priority: DEBUG)).never.returns(true)
54
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", priority: DEBUG)).never.returns(true)
55
55
  @log.debug "test"
56
56
  end
57
57
 
58
58
  def test_simple_info_line
59
59
  setup_appender
60
- @appender.journal.expects(:send).with(has_entries(message: "test", priority: INFO)).once.returns(true)
60
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", priority: INFO)).once.returns(true)
61
61
  @log.info "test"
62
62
  end
63
63
 
64
64
  def test_simple_warning_line
65
65
  setup_appender
66
- @appender.journal.expects(:send).with(has_entries(message: "test", priority: WARN)).once.returns(true)
66
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", priority: WARN)).once.returns(true)
67
67
  @log.warn "test"
68
68
  end
69
69
 
70
70
  def test_simple_error_line
71
71
  setup_appender
72
- @appender.journal.expects(:send).with(has_entries(message: "test", priority: ERR)).once.returns(true)
72
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", priority: ERR)).once.returns(true)
73
73
  @log.error "test"
74
74
  end
75
75
 
76
76
  def test_simple_fatal_line
77
77
  setup_appender
78
- @appender.journal.expects(:send).with(has_entries(message: "test", priority: CRIT)).once.returns(true)
78
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", priority: CRIT)).once.returns(true)
79
79
  @log.fatal "test"
80
80
  end
81
81
 
82
82
  def test_simple_debug_line_as_hash
83
83
  setup_appender
84
- @appender.journal.expects(:send).with(has_entries("message" => "test", priority: DEBUG)).once.returns(true)
84
+ @appender.journal.expects(:send_message).with(has_entries("message" => "test", priority: DEBUG)).once.returns(true)
85
85
  @log.debug "message" => "test"
86
86
  end
87
87
 
88
88
  def test_simple_debug_line_as_hash_with_layout
89
89
  setup_appender(layout: Logging.layouts.pattern(pattern: "X %m X"))
90
- @appender.journal.expects(:send).with(has_entries("message" => "test", priority: DEBUG)).once.returns(true)
90
+ @appender.journal.expects(:send_message).with(has_entries("message" => "test", priority: DEBUG)).once.returns(true)
91
91
  @log.debug "message" => "test"
92
92
  end
93
93
 
94
94
  def test_simple_info_line_with_mdc
95
95
  setup_appender
96
96
  Logging.mdc['test'] = 'value'
97
- @appender.journal.expects(:send).with(has_entries(message: "test", priority: INFO, "test" => "value")).once.returns(true)
97
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", priority: INFO, "test" => "value")).once.returns(true)
98
98
  @log.info "test"
99
99
  ensure
100
100
  Logging.mdc.clear
@@ -103,7 +103,7 @@ module TestLogging
103
103
  def test_simple_info_line_with_ndc
104
104
  setup_appender
105
105
  Logging.ndc << { test: "value" }
106
- @appender.journal.expects(:send).with(has_entries(message: "test", priority: INFO, test: "value")).once.returns(true)
106
+ @appender.journal.expects(:send_message).with(has_entries(message: "test", priority: INFO, test: "value")).once.returns(true)
107
107
  @log.info "test"
108
108
  ensure
109
109
  Logging.ndc.clear
@@ -113,7 +113,7 @@ module TestLogging
113
113
  setup_appender(layout: Logging.layouts.pattern(pattern: "%m %X{test1} %x"))
114
114
  Logging.mdc['test1'] = 'value'
115
115
  Logging.ndc << { "test2" => "value" }
116
- @appender.journal.expects(:send).with(has_entries(message: "test value {\"test2\"=>\"value\"}", priority: INFO, "test1" => "value", "test2" => "value")).once.returns(true)
116
+ @appender.journal.expects(:send_message).with(has_entries(message: "test value {\"test2\"=>\"value\"}", priority: INFO, "test1" => "value", "test2" => "value")).once.returns(true)
117
117
  @log.info "test"
118
118
  ensure
119
119
  Logging.mdc.clear
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logging-journald
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Zapletal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-15 00:00:00.000000000 Z
11
+ date: 2019-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: journald-logger
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: logging
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,21 +39,21 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bundler
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '11.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '11.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: mocha
56
+ name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: mocha
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -127,15 +127,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: '0'
130
+ version: 2.0.0
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
133
  - - ">="
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  requirements: []
137
- rubyforge_project:
138
- rubygems_version: 2.7.6
137
+ rubygems_version: 3.0.3
139
138
  signing_key:
140
139
  specification_version: 4
141
140
  summary: Journald appender for logging gem