betterlog 1.0.0 → 1.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: c5171f51dc33171a188c72054895f947fe0fd9ccbe3e3d0e18a9762195cf74b0
4
- data.tar.gz: 6111239b6014bf07aadba0431c2f586245f51b7f61f1a6fb5530c0e95bb94705
3
+ metadata.gz: dfdf595cf7daec3b80c23beccd01ef848e25e2c02d90d5b0c3b8599b380501e3
4
+ data.tar.gz: 6854574b6f78fed6ed4654ffb406190b22ecf11f8b1c0ec99cc82622b678a42f
5
5
  SHA512:
6
- metadata.gz: f7a065c7e29dbb54423a04128fdc5570d1a2ebf972d0898a4da072b2e215d734c0df3223f9e8b2f704ce8ece011994f17cd6629d20bec494f9808d3ed8350133
7
- data.tar.gz: 69833be6a6378e8891f08861f1eaba1207871582cf71b6275f08dd6a87bde9c177c9dbb7757296879c23bf1907b0207547c6ed25b3f4e64c677ac5a7430c4765
6
+ metadata.gz: 876462422afe5f4c32b79c6bc5fa9a9310d43d8c8bcd4edca84b494950f0d59cc5eae5e1f352624875ccd2fb1497a7795f7bbcd40ba23681ba1e94ffe6d7cc27
7
+ data.tar.gz: 9b5514cffc95723a7331bd9a3183f05e3271fbcaf85e1a813562bb3b4469ac87e8aff57e040264637bbe16bf53d5612a4b70477fb79cae9124613966e72bb2dd
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/betterlog.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: betterlog 1.0.0 ruby lib
2
+ # stub: betterlog 1.1.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "betterlog".freeze
6
- s.version = "1.0.0"
6
+ s.version = "1.1.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["betterplace Developers".freeze]
11
- s.date = "2023-01-30"
11
+ s.date = "2023-02-10"
12
12
  s.description = "This library provides structure json logging for our rails projects".freeze
13
13
  s.email = "developers@betterplace.org".freeze
14
14
  s.executables = ["betterlog".freeze]
@@ -10,6 +10,7 @@ module Betterlog
10
10
  thread_local(:data) { {} }
11
11
 
12
12
  def add(data_hash)
13
+ data_hash = data_hash.symbolize_keys_recursive
13
14
  data = data_hash | data
14
15
  Notifiers.context(data_hash)
15
16
  self
@@ -20,12 +20,15 @@ module Betterlog
20
20
  m = m.sub(/\s+$/, '')
21
21
 
22
22
  timestamp = timestamp.utc.iso8601(3)
23
- event = Log::Event.new(
23
+ event = Log::Event.new({
24
24
  emitter: emitter,
25
25
  timestamp: timestamp,
26
26
  message: m,
27
27
  severity: severity.to_s.downcase,
28
28
  # tags: current_tags,
29
+ meta: (
30
+ Sidekiq::Context.current&.symbolize_keys_recursive if defined?(Sidekiq::Context.current)
31
+ )}.compact
29
32
  )
30
33
  backtrace = m.scan(/^\s*(?:[^:]+):(?:\d+).*$/)
31
34
  if backtrace.size > 1
@@ -1,6 +1,6 @@
1
1
  module Betterlog
2
2
  # Betterlog version
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: betterlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - betterplace Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-30 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar