lamian 1.1.1 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: acfdd2f6cab9189ff775abbc103bd865e527793c
4
- data.tar.gz: a002daaa006afc8fffbd093455641330f78065e8
3
+ metadata.gz: 595ed31da060bf4d84295ed89509fe3668f3666a
4
+ data.tar.gz: 869e4c8b88eead8d73542faba6763e3eff036c24
5
5
  SHA512:
6
- metadata.gz: 27c3758a4a0892c95328a6178c5f7f7c9fb60ca0be3f9d53e85364f5e0537d4ac746a1ed7b6f84f3ef08106b7fa002f3eef6d953f7b6b7d89013259e009a7dc9
7
- data.tar.gz: f8d3853c8b295e43e3293d8f73b5f50b5466fee09e493595d9deb1a25d50c9d44afca6219ceec9c6ae2ff010f43fdd981f318085970c5a6e897370d99578b6e4
6
+ metadata.gz: 7836270051619e4cb130a730625af6d265fcf172192a0702ce048782ea31730e526e8cae2bee2d4431424c1b0edd7603ff5920bb08088f380742bdd31ccf750e
7
+ data.tar.gz: 69bd8f97dd76416699b6ffdc3b6f441e9c5fa7d5313e51d4bf4cea7f85529380b229ccbb2085c01957139461972ef9e345784016a4e33054ffff8acd40201037
@@ -6,9 +6,12 @@ module Lamian
6
6
  # General lamian configuration class
7
7
  # @attr formatter [Logger::Foramtter]
8
8
  # formatter to use in lamian, global
9
- Config = Struct.new(:formatter) do
9
+ # @attr raven_log_size_limit [Integer]
10
+ # size limit when sending lamian log to sentry, defaults to +500_000+
11
+ Config = Struct.new(:formatter, :raven_log_size_limit) do
10
12
  def initialize
11
13
  self.formatter = ::Logger::Formatter.new
14
+ self.raven_log_size_limit = 500_000
12
15
  end
13
16
  end
14
17
  end
@@ -5,7 +5,7 @@ module Lamian::RavenContextExtension
5
5
  # Adds current lamian log to the extra part of all raven events generated inside Lamian.run block
6
6
  # @see https://www.rubydoc.info/gems/sentry-raven/0.9.2/Raven/Context#extra-instance_method
7
7
  def extra
8
- log = Lamian.dump(format: :txt)
8
+ log = Lamian.dump(format: :txt)&.slice(0, Lamian.config.raven_log_size_limit)
9
9
  log ? super.merge!(lamian_log: log) : super
10
10
  end
11
11
  end
@@ -13,5 +13,5 @@ module Lamian
13
13
  # According to this, it is enought to specify '~> a.b'
14
14
  # if private API was not used and to specify '~> a.b.c' if it was
15
15
 
16
- VERSION = "1.1.1"
16
+ VERSION = "1.2.0"
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lamian
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JelF
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-26 00:00:00.000000000 Z
11
+ date: 2018-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails