openhab-scripting 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openhab/log/logger.rb +20 -3
- data/lib/openhab/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90af7470bbd47fa813a1a4a5a9083f178a36225ab6f9cfbd2ff1852cc0eb4c92
|
4
|
+
data.tar.gz: 789d9c72ce03d498416bf53c86d6b7f895df8296d849f702b59398e831aad6f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9066fe74d2d508e06ce9a62244a19a75470fcffb85bdbcaa2c899b5220a15da351ae4f55be08fb80d3c3222a1a26d16471420049b8621a60d143f16b867d7180
|
7
|
+
data.tar.gz: 53d1df31662e7552566d6dd92237b862b32f988e4edf42bc95b44fff3af425e5a038771c2372e2fe71928867c41962907825a24e05fbf3e91ed31f5ff6ee2778
|
data/lib/openhab/log/logger.rb
CHANGED
@@ -22,9 +22,21 @@ module OpenHAB
|
|
22
22
|
#
|
23
23
|
# Regex for matching internal calls in a stack trace
|
24
24
|
#
|
25
|
-
INTERNAL_CALL_REGEX = %r{(openhab-scripting-.*/lib)|
|
25
|
+
INTERNAL_CALL_REGEX = %r{(openhab-scripting-.*/lib)|org[./]jruby}.freeze
|
26
26
|
private_constant :INTERNAL_CALL_REGEX
|
27
27
|
|
28
|
+
#
|
29
|
+
# Regex for matching internal calls in a java stack trace
|
30
|
+
#
|
31
|
+
EXCLUDED_JAVA_PACKAGES = /jdk\.internal\.reflect|java\.lang\.reflect|org\.openhab|java\.lang\.Thread\.run/.freeze
|
32
|
+
private_constant :EXCLUDED_JAVA_PACKAGES
|
33
|
+
|
34
|
+
#
|
35
|
+
# Regex for matching internal calls in a java stack trace
|
36
|
+
#
|
37
|
+
JAVA_INTERNAL_CALL_REGEX = Regexp.union(INTERNAL_CALL_REGEX, EXCLUDED_JAVA_PACKAGES).freeze
|
38
|
+
private_constant :JAVA_INTERNAL_CALL_REGEX
|
39
|
+
|
28
40
|
#
|
29
41
|
# Create a new logger
|
30
42
|
#
|
@@ -60,8 +72,13 @@ module OpenHAB
|
|
60
72
|
def clean_backtrace(error)
|
61
73
|
return error if debug_enabled?
|
62
74
|
|
63
|
-
|
64
|
-
|
75
|
+
if error.respond_to? :backtrace_locations
|
76
|
+
backtrace = error.backtrace_locations.map(&:to_s).reject { |line| INTERNAL_CALL_REGEX.match? line }
|
77
|
+
error.set_backtrace(backtrace)
|
78
|
+
elsif error.respond_to? :stack_trace
|
79
|
+
backtrace = error.stack_trace.reject { |line| JAVA_INTERNAL_CALL_REGEX.match? line.to_s }
|
80
|
+
error.set_stack_trace(backtrace)
|
81
|
+
end
|
65
82
|
error
|
66
83
|
end
|
67
84
|
|
data/lib/openhab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openhab-scripting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|