barking_iguana-logging 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/example.rb +10 -2
- data/lib/barking_iguana/logging.rb +3 -5
- data/lib/barking_iguana/logging/version.rb +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09b65d94ce622f1e77497bfc1341a70ab267c3b3
|
4
|
+
data.tar.gz: 01eeec8e10fba14ca87ac7ef66c9da547e6a102d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9001ed338424718b70e2fdcac31d9d6ea795ab48abdb1abb478c7b1a527677092694966e9c7e9b6b5754a431430723d408eb5dbbf918464cc07caf43a51c617f
|
7
|
+
data.tar.gz: cbca774edb1580ce80f34a22ec9aad9fe7b73053c8796bb2ca54763db3ad46f360da25204b0915e81e7e1e0e17974fe8a95501fd7518ba4f6d7406a3213b5507
|
data/example/example.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'barking_iguana/logging'
|
2
2
|
|
3
|
+
BarkingIguana::Logging.colours = %w(red blue green yellow)
|
3
4
|
class Example
|
4
5
|
include BarkingIguana::Logging::Helper
|
5
6
|
|
@@ -8,8 +9,15 @@ class Example
|
|
8
9
|
end
|
9
10
|
|
10
11
|
def run
|
11
|
-
|
12
|
-
|
12
|
+
logger.info message
|
13
|
+
end
|
14
|
+
|
15
|
+
def message
|
16
|
+
(1..rand(25)).to_a.map { word }.join ' '
|
17
|
+
end
|
18
|
+
|
19
|
+
def word
|
20
|
+
('a'..'z').sort_by { rand }[0,1 + rand(10)].join
|
13
21
|
end
|
14
22
|
end
|
15
23
|
|
@@ -10,7 +10,9 @@ module BarkingIguana
|
|
10
10
|
include Otk::Defaults
|
11
11
|
defaults default_level: Logger::INFO,
|
12
12
|
default_target: Output.new($stdout),
|
13
|
-
default_raw_append_threshold: Logger::DEBUG
|
13
|
+
default_raw_append_threshold: Logger::DEBUG,
|
14
|
+
colours: %i(red green yellow blue magenta cyan white)
|
15
|
+
|
14
16
|
|
15
17
|
def self.get_logger for_instance
|
16
18
|
Logger.new(default_target).tap do |l|
|
@@ -19,10 +21,6 @@ module BarkingIguana
|
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
22
|
-
def self.colours
|
23
|
-
%i(red green yellow blue magenta cyan white)
|
24
|
-
end
|
25
|
-
|
26
24
|
def self.default_formatter for_instance
|
27
25
|
name = for_instance.class.name
|
28
26
|
id = for_instance.object_id
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barking_iguana-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig R Webster
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.12'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.12'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: barking_iguana-otk
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: term-ansicolor
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description:
|
@@ -87,9 +87,9 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- .gitignore
|
91
|
-
- .rspec
|
92
|
-
- .travis.yml
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
93
|
- CODE_OF_CONDUCT.md
|
94
94
|
- Gemfile
|
95
95
|
- LICENSE.txt
|
@@ -115,17 +115,17 @@ require_paths:
|
|
115
115
|
- lib
|
116
116
|
required_ruby_version: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- -
|
118
|
+
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.4.5.1
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Helpers for my logging conventions
|