roqua-support 0.4.0 → 0.4.1

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: ba331b8cd7288dd98818cc40f6bd94eb5a7b4de085536b2acaae63be5fa7bf68
4
- data.tar.gz: d003572377199b362bb14c681620013f7db75edf7a02a6be2a3661b4dae17edb
3
+ metadata.gz: 0104ee377feaa85014f2a233e86c618a08de92e7b55cd273fe7832f491f070b4
4
+ data.tar.gz: 7c04430ab277f7c69cb0d1cf8d54a0901cb127460b2b68e3b91ad3c01b171204
5
5
  SHA512:
6
- metadata.gz: 2f5ca88d5af226aca07fb1d8b212c15ece4b719d13dbbe0bd64fff263c50b8e50d4ed857058694b594d444f100c0e5bc01a59775579d382d3060b6f5b04950fa
7
- data.tar.gz: 15a161ebb389456b0e3a91ac7f9545c43091596793c03d7167bb6b00532e54cac5a4d7c0f520b12dd89aab8905d2ab21d446cf6e40f09029e9a1c6d8bd84ab7a
6
+ metadata.gz: da8540ad9f35f3738485ec3f58b28ba14c2a330ae6ae2cd4d1bfefbe46206f0c7c8b842053829dcf4e668d57c03890137f2536c559d805d51ba1c04755daf58c
7
+ data.tar.gz: 01a31a8402b496e30298ceda86e2ebcbf06eb09d7453e9a56a681f159335eab03d3436487e4bb138afbe027990a1c4747acf0c3d06756a4d3ae56749144635da
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.1
2
+
3
+ * Add timezone to logging timestamps. Use milliseconds instead of microseconds precision.
4
+
1
5
  ## 0.4.0
2
6
 
3
7
  * Remove support for ruby 2.5 and 2.6
data/Gemfile.lock CHANGED
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- roqua-support (0.4.0)
13
+ roqua-support (0.4.1)
14
14
  active_interaction (>= 3.0, < 5.0)
15
15
  activesupport (>= 5.2, < 6.2)
16
16
  appsignal (>= 2.9, < 3.1)
@@ -33,8 +33,9 @@ GEM
33
33
  erubi (~> 1.4)
34
34
  rails-dom-testing (~> 2.0)
35
35
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
36
- active_interaction (4.0.0)
36
+ active_interaction (4.0.5)
37
37
  activemodel (>= 5, < 7)
38
+ activesupport (>= 5, < 7)
38
39
  activemodel (6.0.2.2)
39
40
  activesupport (= 6.0.2.2)
40
41
  activerecord (6.0.2.2)
@@ -50,7 +51,7 @@ GEM
50
51
  bundler
51
52
  rake
52
53
  thor (>= 0.14.0)
53
- appsignal (3.0.2)
54
+ appsignal (3.0.13)
54
55
  rack
55
56
  ast (2.4.2)
56
57
  builder (3.2.4)
@@ -7,6 +7,8 @@ class RoquaLoggingRailtie < Rails::Railtie
7
7
  def configure
8
8
  Roqua.logger = ActiveSupport::Logger.new(output_stream).tap do |logger|
9
9
  logger.formatter = Logger::Formatter.new
10
+ # Set the datetime_format to include timezone and use milliseconds instead of microseconds
11
+ logger.formatter.datetime_format = '%Y-%m-%dT%H:%M:%S.%L%z '
10
12
  end
11
13
 
12
14
  require 'roqua/support/request_logger'
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module Support
3
- VERSION = '0.4.0'.freeze
3
+ VERSION = '0.4.1'.freeze
4
4
  end
5
5
  end
@@ -27,6 +27,12 @@ Rspec.describe RoquaLoggingRailtie do
27
27
  ActiveSupport::Logger.logger_outputs_to?(Roqua.logger.logger, STDOUT)
28
28
  ).to be_truthy
29
29
  end
30
+
31
+ it 'logs using a datetimeformat including timezone' do
32
+ time = Time.zone.local(2021,10,10,16,13)
33
+ got = Roqua.logger.logger.formatter.call 'INFO', time, 'progname', '{}'
34
+ expect(got).to match(/I, \[2021-10-10T16:13:00.000\+0000 #\d+] INFO -- progname: {}/)
35
+ end
30
36
  end
31
37
 
32
38
  context 'when RAILS_LOG_TO_STDOUT_USING_ROQUA_LOGGER is blank' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2021-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_interaction
@@ -266,7 +266,7 @@ homepage: https://github.com/roqua/roqua-support
266
266
  licenses:
267
267
  - MIT
268
268
  metadata: {}
269
- post_install_message:
269
+ post_install_message:
270
270
  rdoc_options: []
271
271
  require_paths:
272
272
  - lib
@@ -282,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
282
  version: '0'
283
283
  requirements: []
284
284
  rubygems_version: 3.1.4
285
- signing_key:
285
+ signing_key:
286
286
  specification_version: 4
287
287
  summary: Helper objects and proxies used by a lot of RoQua applications
288
288
  test_files: