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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0d3fc64e66b4cdc0f85cdd1dd9124edb59a77ce
4
- data.tar.gz: d0cc1924c4c28c1a475224e3146710635d7fb0a0
3
+ metadata.gz: 9002759f4e430ddf783db14bbce434bde72ab52f
4
+ data.tar.gz: 102280caab2ab630b72fa8f598275837f747256e
5
5
  SHA512:
6
- metadata.gz: adea0b753a1eb719124166d3aadc7b507054cd971c3873c62ffc9b7464b922ea105cf01348cab27ae7b5da57ac36e324517695c4d5440e9304b9c02052e8f2b1
7
- data.tar.gz: 64d1ee8c85bc03a8dfb056758d429f3a793d65a22ec94427f5940547c33bb5fba84e676c0760b62344cbfa8adbc603808896f7dce120bbd67288a47ee0b05c34
6
+ metadata.gz: d03c652f11b3da3093960714a9fe0a150f585923f610a14860c970e2680c8195ddcf9be140b07db9a73d1687c11f6b5a5e414ea713d5947e553776918f929a81
7
+ data.tar.gz: 1bade1783726b10243c369b2245ec898d8313c9612af05a475fa0941b7636f4282ee2fef107cbeda04a93de072428aef32b0b67a3d2725b08e21f19f3975843c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- logatron (0.2.6)
4
+ logatron (0.3.0)
5
5
  activesupport (~> 4.2, >= 4.2.1)
6
6
 
7
7
  GEM
@@ -16,8 +16,10 @@ module Logatron
16
16
  @log ||= Logatron::BasicLogger.new
17
17
  end
18
18
 
19
- def log_exception(e, severity)
20
- logger.send(severity.downcase, "#{e.class} #{e.message} -> #{configuration.backtrace_cleaner.clean(e.backtrace).join(' -> ')}")
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
@@ -5,7 +5,7 @@ require 'logatron/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'logatron'
8
- spec.version = '0.2.6'
8
+ spec.version = '0.3.0'
9
9
  spec.authors = ['Justin Grimes']
10
10
  spec.email = ['justin.mgrimes@gmail.com']
11
11
 
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.2.6
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-15 00:00:00.000000000 Z
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.4.8
136
+ rubygems_version: 2.6.2
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Logging for ascent