logatron 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/logatron/logatron.rb +13 -2
- data/logatron.gemspec +1 -1
- data/update_version.sh +0 -19
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9002759f4e430ddf783db14bbce434bde72ab52f
|
4
|
+
data.tar.gz: 102280caab2ab630b72fa8f598275837f747256e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03c652f11b3da3093960714a9fe0a150f585923f610a14860c970e2680c8195ddcf9be140b07db9a73d1687c11f6b5a5e414ea713d5947e553776918f929a81
|
7
|
+
data.tar.gz: 1bade1783726b10243c369b2245ec898d8313c9612af05a475fa0941b7636f4282ee2fef107cbeda04a93de072428aef32b0b67a3d2725b08e21f19f3975843c
|
data/Gemfile.lock
CHANGED
data/lib/logatron/logatron.rb
CHANGED
@@ -16,8 +16,10 @@ module Logatron
|
|
16
16
|
@log ||= Logatron::BasicLogger.new
|
17
17
|
end
|
18
18
|
|
19
|
-
def log_exception(e, severity)
|
20
|
-
|
19
|
+
def log_exception(e, severity, additional_info={})
|
20
|
+
# 'additional_info' can be a flat hash or anything with '#to_s'
|
21
|
+
message = exception_message(e, additional_info)
|
22
|
+
logger.send(severity.downcase, message)
|
21
23
|
end
|
22
24
|
|
23
25
|
def level=(level)
|
@@ -72,5 +74,14 @@ module Logatron
|
|
72
74
|
def msg_id=(id)
|
73
75
|
Logatron::Contexts.msg_id = id
|
74
76
|
end
|
77
|
+
|
78
|
+
private
|
79
|
+
|
80
|
+
def exception_message(e, additional)
|
81
|
+
info = additional.is_a?(Hash) ? additional.map { |(k, v)| "#{k}=>#{v}"}.join(', ') : additional
|
82
|
+
info_msg = info.nil? || info.empty? ? '' : "; MORE_INFO( #{info} )"
|
83
|
+
backtrace = configuration.backtrace_cleaner.clean(e.backtrace).join(' -> ')
|
84
|
+
"#{e.class} #{e.message}#{info_msg} -> #{backtrace}"
|
85
|
+
end
|
75
86
|
end
|
76
87
|
end
|
data/logatron.gemspec
CHANGED
data/update_version.sh
CHANGED
@@ -5,23 +5,6 @@
|
|
5
5
|
VERSION="$1"
|
6
6
|
VERSION="${VERSION:?"must provide version as first parameter"}"
|
7
7
|
SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd)"
|
8
|
-
FEATURE_DIR="${SCRIPT_DIR}/features"
|
9
|
-
FEATURE_PREFIX=CR
|
10
|
-
|
11
|
-
ensureLabelerInstalled(){
|
12
|
-
if ! which label_features > /dev/null; then
|
13
|
-
echo -e "\nERROR: Install the feature file labeler gem"
|
14
|
-
echo " https://github.com/indigo-biosystems/feature_file_labeler"
|
15
|
-
exit 1
|
16
|
-
fi
|
17
|
-
}
|
18
|
-
|
19
|
-
labelFeatures(){
|
20
|
-
echo -e "\nUpdating feature files"
|
21
|
-
label_features -p "${FEATURE_PREFIX}" -d "${FEATURE_DIR}" 2>&1 > ../"${FEATURE_PREFIX}_output.txt"
|
22
|
-
mv feature_report.txt ../"${FEATURE_PREFIX}_feature_report.txt"
|
23
|
-
stageAndCommit "Label feature files" "${FEATURE_DIR}"
|
24
|
-
}
|
25
8
|
|
26
9
|
updateVersion(){
|
27
10
|
updateGemspec
|
@@ -74,6 +57,4 @@ thereAreStagedFiles(){
|
|
74
57
|
fi
|
75
58
|
}
|
76
59
|
|
77
|
-
#ensureLabelerInstalled
|
78
|
-
#labelFeatures
|
79
60
|
updateVersion
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logatron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Grimes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
135
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.
|
136
|
+
rubygems_version: 2.6.2
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: Logging for ascent
|