lamian 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lamian/config.rb +4 -1
- data/lib/lamian/raven_context_extension.rb +1 -1
- data/lib/lamian/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 595ed31da060bf4d84295ed89509fe3668f3666a
|
4
|
+
data.tar.gz: 869e4c8b88eead8d73542faba6763e3eff036c24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7836270051619e4cb130a730625af6d265fcf172192a0702ce048782ea31730e526e8cae2bee2d4431424c1b0edd7603ff5920bb08088f380742bdd31ccf750e
|
7
|
+
data.tar.gz: 69bd8f97dd76416699b6ffdc3b6f441e9c5fa7d5313e51d4bf4cea7f85529380b229ccbb2085c01957139461972ef9e345784016a4e33054ffff8acd40201037
|
data/lib/lamian/config.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/lamian/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|