berkeley_library-logging 0.2.6.1 → 0.2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.idea/logging.iml +60 -9
- data/CHANGES.md +5 -0
- data/lib/berkeley_library/logging/loggers.rb +9 -8
- data/lib/berkeley_library/logging/module_info.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: 48c51023acdd7645c3bb8b848866530073434912b93498b4b12a739dd117da52
|
|
4
|
+
data.tar.gz: 40fc965452fba9f55877ef598eb594e510a67d1e8f77add187efe1b34f4395b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9ecb21c588ccc52ee496c6fd4eb1e9bd47a771147da4707814931b48e58b0a50b4f5d5ce9d7f5974bdaa4fc1ee82ad456e5ac42f4d73931a69cde6652e3a2da
|
|
7
|
+
data.tar.gz: b4ffb91ebc7c1d4c98ca314f587ad66dfe92755556d345dd8b459412cf9ff657ed8f70e2c6ccd6060aed44167cc135911f90aeb9ab56e580c3388a6eba361928
|
data/.idea/logging.iml
CHANGED
|
@@ -7,6 +7,17 @@
|
|
|
7
7
|
<content url="file://$MODULE_DIR$" />
|
|
8
8
|
<orderEntry type="jdk" jdkName="RVM: ruby-2.7.5" jdkType="RUBY_SDK" />
|
|
9
9
|
<orderEntry type="sourceFolder" forTests="false" />
|
|
10
|
+
<orderEntry type="library" scope="PROVIDED" name="actioncable (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="actionmailbox (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
13
|
+
<orderEntry type="library" scope="PROVIDED" name="actionpack (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="actiontext (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="actionview (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="activejob (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="activemodel (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="activerecord (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="activestorage (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="activesupport (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
10
21
|
<orderEntry type="library" scope="PROVIDED" name="amazing_print (v1.4.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
11
22
|
<orderEntry type="library" scope="PROVIDED" name="ansi (v1.5.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
12
23
|
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
@@ -32,6 +43,7 @@
|
|
|
32
43
|
<orderEntry type="library" scope="PROVIDED" name="irb (v1.4.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
33
44
|
<orderEntry type="library" scope="PROVIDED" name="listen (v3.1.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
34
45
|
<orderEntry type="library" scope="PROVIDED" name="lograge (v0.12.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
46
|
+
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.18.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
35
47
|
<orderEntry type="library" scope="PROVIDED" name="mail (v2.7.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
36
48
|
<orderEntry type="library" scope="PROVIDED" name="marcel (v1.0.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
37
49
|
<orderEntry type="library" scope="PROVIDED" name="method_source (v1.0.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
@@ -39,45 +51,50 @@
|
|
|
39
51
|
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.15.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
40
52
|
<orderEntry type="library" scope="PROVIDED" name="net-imap (v0.2.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
41
53
|
<orderEntry type="library" scope="PROVIDED" name="net-pop (v0.1.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
54
|
+
<orderEntry type="library" scope="PROVIDED" name="net-protocol (v0.1.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
42
55
|
<orderEntry type="library" scope="PROVIDED" name="net-smtp (v0.3.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
43
56
|
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.5.8, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
57
|
+
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.13.6, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
44
58
|
<orderEntry type="library" scope="PROVIDED" name="oj (v3.13.11, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
45
59
|
<orderEntry type="library" scope="PROVIDED" name="ougai (v1.9.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
46
|
-
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.
|
|
47
|
-
<orderEntry type="library" scope="PROVIDED" name="parser (v3.1.
|
|
60
|
+
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
61
|
+
<orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
48
62
|
<orderEntry type="library" scope="PROVIDED" name="racc (v1.6.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
49
63
|
<orderEntry type="library" scope="PROVIDED" name="rack (v2.2.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
50
64
|
<orderEntry type="library" scope="PROVIDED" name="rack-test (v1.1.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
65
|
+
<orderEntry type="library" scope="PROVIDED" name="rails (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
51
66
|
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
52
67
|
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.4.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
68
|
+
<orderEntry type="library" scope="PROVIDED" name="railties (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
53
69
|
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
54
70
|
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
55
71
|
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.11.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
56
72
|
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.10.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
57
|
-
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.
|
|
73
|
+
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.4.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
58
74
|
<orderEntry type="library" scope="PROVIDED" name="reline (v0.3.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
59
75
|
<orderEntry type="library" scope="PROVIDED" name="request_store (v1.5.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
60
76
|
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
61
77
|
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
62
78
|
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
63
79
|
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
64
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.11.
|
|
80
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.11.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
65
81
|
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
66
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v1.26.
|
|
67
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.
|
|
82
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop (v1.26.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
83
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.17.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
68
84
|
<orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v2.4.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
69
85
|
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
70
86
|
<orderEntry type="library" scope="PROVIDED" name="ruby_dep (v1.5.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
71
87
|
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.21.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
72
88
|
<orderEntry type="library" scope="PROVIDED" name="simplecov-console (v0.9.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
73
89
|
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.12.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
74
|
-
<orderEntry type="library" scope="PROVIDED" name="simplecov-rcov (v0.
|
|
90
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov-rcov (v0.3.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
75
91
|
<orderEntry type="library" scope="PROVIDED" name="simplecov_json_formatter (v0.1.4, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
92
|
+
<orderEntry type="library" scope="PROVIDED" name="strscan (v3.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
76
93
|
<orderEntry type="library" scope="PROVIDED" name="terminal-table (v3.0.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
77
94
|
<orderEntry type="library" scope="PROVIDED" name="thor (v1.2.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
78
95
|
<orderEntry type="library" scope="PROVIDED" name="timeout (v0.2.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
79
96
|
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.4, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
80
|
-
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (
|
|
97
|
+
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.1.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
81
98
|
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
82
99
|
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
83
100
|
<orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.5.4, RVM: ruby-2.7.5) [gem]" level="application" />
|
|
@@ -88,7 +105,41 @@
|
|
|
88
105
|
</component>
|
|
89
106
|
<component name="RakeTasksCache">
|
|
90
107
|
<option name="myRootTask">
|
|
91
|
-
<RakeTaskImpl id="rake"
|
|
108
|
+
<RakeTaskImpl id="rake">
|
|
109
|
+
<subtasks>
|
|
110
|
+
<RakeTaskImpl id="bundle">
|
|
111
|
+
<subtasks>
|
|
112
|
+
<RakeTaskImpl description="Check bundled gems for vulnerabilities against the latest ruby-advisory-db" fullCommand="bundle:audit" id="audit" />
|
|
113
|
+
</subtasks>
|
|
114
|
+
</RakeTaskImpl>
|
|
115
|
+
<RakeTaskImpl description="Check test coverage, check code style, check gems for vulnerabilities" fullCommand="check" id="check" />
|
|
116
|
+
<RakeTaskImpl description="Remove artifacts directory, except for .keep file" fullCommand="clean" id="clean" />
|
|
117
|
+
<RakeTaskImpl description="Run all specs in spec directory, with coverage" fullCommand="coverage" id="coverage" />
|
|
118
|
+
<RakeTaskImpl description="Clean, check, build gem" fullCommand="default" id="default" />
|
|
119
|
+
<RakeTaskImpl description="Build berkeley_library-logging.gemspec as berkeley_library-logging-0.2.6.1.gem" fullCommand="gem" id="gem" />
|
|
120
|
+
<RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
|
|
121
|
+
<RakeTaskImpl id="rubocop">
|
|
122
|
+
<subtasks>
|
|
123
|
+
<RakeTaskImpl description="Auto-correct RuboCop offenses" fullCommand="rubocop:auto_correct" id="auto_correct" />
|
|
124
|
+
</subtasks>
|
|
125
|
+
</RakeTaskImpl>
|
|
126
|
+
<RakeTaskImpl description="Run all specs in spec directory" fullCommand="spec" id="spec" />
|
|
127
|
+
<RakeTaskImpl id="spec">
|
|
128
|
+
<subtasks>
|
|
129
|
+
<RakeTaskImpl description="Run specs in spec/rails directory" fullCommand="spec:rails" id="rails" />
|
|
130
|
+
<RakeTaskImpl description="Run specs in spec/standalone directory" fullCommand="spec:standalone" id="standalone" />
|
|
131
|
+
<RakeTaskImpl description="" fullCommand="spec:all" id="all" />
|
|
132
|
+
<RakeTaskImpl description="" fullCommand="spec:prepare" id="prepare" />
|
|
133
|
+
</subtasks>
|
|
134
|
+
</RakeTaskImpl>
|
|
135
|
+
<RakeTaskImpl id="simplecov">
|
|
136
|
+
<subtasks>
|
|
137
|
+
<RakeTaskImpl description="" fullCommand="simplecov:check_coverage" id="check_coverage" />
|
|
138
|
+
<RakeTaskImpl description="" fullCommand="simplecov:report" id="report" />
|
|
139
|
+
</subtasks>
|
|
140
|
+
</RakeTaskImpl>
|
|
141
|
+
</subtasks>
|
|
142
|
+
</RakeTaskImpl>
|
|
92
143
|
</option>
|
|
93
144
|
</component>
|
|
94
145
|
</module>
|
data/CHANGES.md
CHANGED
|
@@ -9,13 +9,7 @@ module BerkeleyLibrary
|
|
|
9
9
|
FALLBACK_LOG_DIR = 'log'.freeze
|
|
10
10
|
|
|
11
11
|
def default_logger
|
|
12
|
-
|
|
13
|
-
return Rails.logger if Rails.logger
|
|
14
|
-
|
|
15
|
-
warn('Rails is defined, but Rails logger is nil')
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
new_default_logger
|
|
12
|
+
rails_logger || new_default_logger
|
|
19
13
|
end
|
|
20
14
|
|
|
21
15
|
# TODO: support passing a hash / passing default_log_file
|
|
@@ -38,6 +32,13 @@ module BerkeleyLibrary
|
|
|
38
32
|
|
|
39
33
|
private
|
|
40
34
|
|
|
35
|
+
def rails_logger
|
|
36
|
+
return unless defined?(Rails)
|
|
37
|
+
return unless Rails.respond_to?(:logger)
|
|
38
|
+
|
|
39
|
+
Rails.logger
|
|
40
|
+
end
|
|
41
|
+
|
|
41
42
|
def new_broadcast_logger(config)
|
|
42
43
|
new_json_logger($stdout).tap do |json_logger|
|
|
43
44
|
file_logger = rails_file_logger(config)
|
|
@@ -68,7 +69,7 @@ module BerkeleyLibrary
|
|
|
68
69
|
end
|
|
69
70
|
|
|
70
71
|
def workdir
|
|
71
|
-
return Rails.application.root if defined?(Rails)
|
|
72
|
+
return Rails.application.root if defined?(Rails) && Rails.respond_to?(:application)
|
|
72
73
|
|
|
73
74
|
Pathname.getwd
|
|
74
75
|
end
|
|
@@ -7,7 +7,7 @@ module BerkeleyLibrary
|
|
|
7
7
|
SUMMARY = 'Opinionated Ruby/Rails logging for UC Berkeley Library'.freeze
|
|
8
8
|
DESCRIPTION = 'A gem providing shared logging code for UC Berkeley Library gems and Rails applications'.freeze
|
|
9
9
|
LICENSE = 'MIT'.freeze
|
|
10
|
-
VERSION = '0.2.6.
|
|
10
|
+
VERSION = '0.2.6.2'.freeze
|
|
11
11
|
HOMEPAGE = 'https://github.com/BerkeleyLibrary/logging'.freeze
|
|
12
12
|
|
|
13
13
|
private_class_method :new
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: berkeley_library-logging
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.6.
|
|
4
|
+
version: 0.2.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Moles
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-05-
|
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|