memolog 0.3.2 → 0.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97630c7e390e26c97872776f9c6b142fcb18cafaf05ceb937a8ee4a10537212c
4
- data.tar.gz: 568faf40b03bc8488d651b7e09eda247f5f22e399d583d97b671868618b91e4c
3
+ metadata.gz: d8cb342892f52d20fa06101e203aa4d4d1c5efea05696c48bb7a30804b66befb
4
+ data.tar.gz: 4e7f8721ae37487cc8d88316432d2897f269c1817e75d66e562c5b846521cbd6
5
5
  SHA512:
6
- metadata.gz: fb3b455425fa4e68c68620248e1cf3493e1888e7023e62cb1179b31b1a316def07c0b918ae1fa4ba3b3ff6b23c339a9f481a340fcd784a712405622ad87a77b1
7
- data.tar.gz: 8cde0d72453487d056a4e507a06943bc21d2a5c5d52a8c6298b85bdc81375c189fd39904be27fb5304757cbba70493650b9a14ec4f0482846ae7ae587fe11572
6
+ metadata.gz: 806d71859e439c83417ad71f5c97f53358405e55243f982e79ce5f28b6736f1ae0175c6bf25822bbd30c27dea0f04584b4eb820df8ec8a8632c5487d48667a31
7
+ data.tar.gz: fbf2765dcf76597eba069a9d627e5728306043962bb92b3e23aab8e253cc948be10a4bbc4220b3d66bcb48d62ca3f9b9e362c88e03ea98a8f268dc51160b2926
@@ -24,7 +24,7 @@ jobs:
24
24
 
25
25
  strategy:
26
26
  matrix:
27
- ruby: [2.5, 2.6, 2.7, 3.0]
27
+ ruby: [2.7, 3.0]
28
28
 
29
29
  steps:
30
30
  - uses: actions/checkout@v2
data/Gemfile.lock CHANGED
@@ -1,206 +1,225 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- memolog (0.3.2)
4
+ memolog (0.4.0)
5
+ json (~> 2)
5
6
  logger (~> 1.4.3)
6
7
  securerandom (~> 0.1.0)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- actioncable (6.1.4.1)
12
- actionpack (= 6.1.4.1)
13
- activesupport (= 6.1.4.1)
12
+ actioncable (7.0.1)
13
+ actionpack (= 7.0.1)
14
+ activesupport (= 7.0.1)
14
15
  nio4r (~> 2.0)
15
16
  websocket-driver (>= 0.6.1)
16
- actionmailbox (6.1.4.1)
17
- actionpack (= 6.1.4.1)
18
- activejob (= 6.1.4.1)
19
- activerecord (= 6.1.4.1)
20
- activestorage (= 6.1.4.1)
21
- activesupport (= 6.1.4.1)
17
+ actionmailbox (7.0.1)
18
+ actionpack (= 7.0.1)
19
+ activejob (= 7.0.1)
20
+ activerecord (= 7.0.1)
21
+ activestorage (= 7.0.1)
22
+ activesupport (= 7.0.1)
22
23
  mail (>= 2.7.1)
23
- actionmailer (6.1.4.1)
24
- actionpack (= 6.1.4.1)
25
- actionview (= 6.1.4.1)
26
- activejob (= 6.1.4.1)
27
- activesupport (= 6.1.4.1)
24
+ net-imap
25
+ net-pop
26
+ net-smtp
27
+ actionmailer (7.0.1)
28
+ actionpack (= 7.0.1)
29
+ actionview (= 7.0.1)
30
+ activejob (= 7.0.1)
31
+ activesupport (= 7.0.1)
28
32
  mail (~> 2.5, >= 2.5.4)
33
+ net-imap
34
+ net-pop
35
+ net-smtp
29
36
  rails-dom-testing (~> 2.0)
30
- actionpack (6.1.4.1)
31
- actionview (= 6.1.4.1)
32
- activesupport (= 6.1.4.1)
33
- rack (~> 2.0, >= 2.0.9)
37
+ actionpack (7.0.1)
38
+ actionview (= 7.0.1)
39
+ activesupport (= 7.0.1)
40
+ rack (~> 2.0, >= 2.2.0)
34
41
  rack-test (>= 0.6.3)
35
42
  rails-dom-testing (~> 2.0)
36
43
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.1.4.1)
38
- actionpack (= 6.1.4.1)
39
- activerecord (= 6.1.4.1)
40
- activestorage (= 6.1.4.1)
41
- activesupport (= 6.1.4.1)
44
+ actiontext (7.0.1)
45
+ actionpack (= 7.0.1)
46
+ activerecord (= 7.0.1)
47
+ activestorage (= 7.0.1)
48
+ activesupport (= 7.0.1)
49
+ globalid (>= 0.6.0)
42
50
  nokogiri (>= 1.8.5)
43
- actionview (6.1.4.1)
44
- activesupport (= 6.1.4.1)
51
+ actionview (7.0.1)
52
+ activesupport (= 7.0.1)
45
53
  builder (~> 3.1)
46
54
  erubi (~> 1.4)
47
55
  rails-dom-testing (~> 2.0)
48
56
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.1.4.1)
50
- activesupport (= 6.1.4.1)
57
+ activejob (7.0.1)
58
+ activesupport (= 7.0.1)
51
59
  globalid (>= 0.3.6)
52
- activemodel (6.1.4.1)
53
- activesupport (= 6.1.4.1)
54
- activerecord (6.1.4.1)
55
- activemodel (= 6.1.4.1)
56
- activesupport (= 6.1.4.1)
57
- activestorage (6.1.4.1)
58
- actionpack (= 6.1.4.1)
59
- activejob (= 6.1.4.1)
60
- activerecord (= 6.1.4.1)
61
- activesupport (= 6.1.4.1)
62
- marcel (~> 1.0.0)
60
+ activemodel (7.0.1)
61
+ activesupport (= 7.0.1)
62
+ activerecord (7.0.1)
63
+ activemodel (= 7.0.1)
64
+ activesupport (= 7.0.1)
65
+ activestorage (7.0.1)
66
+ actionpack (= 7.0.1)
67
+ activejob (= 7.0.1)
68
+ activerecord (= 7.0.1)
69
+ activesupport (= 7.0.1)
70
+ marcel (~> 1.0)
63
71
  mini_mime (>= 1.1.0)
64
- activesupport (6.1.4.1)
72
+ activesupport (7.0.1)
65
73
  concurrent-ruby (~> 1.0, >= 1.0.2)
66
74
  i18n (>= 1.6, < 2)
67
75
  minitest (>= 5.1)
68
76
  tzinfo (~> 2.0)
69
- zeitwerk (~> 2.3)
70
77
  ast (2.4.2)
71
78
  builder (3.2.4)
72
79
  coderay (1.1.3)
73
80
  concurrent-ruby (1.1.9)
74
81
  connection_pool (2.2.5)
75
82
  crass (1.0.6)
76
- diff-lcs (1.4.4)
83
+ diff-lcs (1.5.0)
84
+ digest (3.1.0)
77
85
  erubi (1.10.0)
78
- globalid (0.5.2)
86
+ globalid (1.0.0)
79
87
  activesupport (>= 5.0)
80
- i18n (1.8.10)
88
+ i18n (1.9.1)
81
89
  concurrent-ruby (~> 1.0)
90
+ io-wait (0.2.1)
91
+ json (2.6.1)
82
92
  logger (1.4.4)
83
- loofah (2.12.0)
93
+ loofah (2.13.0)
84
94
  crass (~> 1.0.2)
85
95
  nokogiri (>= 1.5.9)
86
96
  mail (2.7.1)
87
97
  mini_mime (>= 0.1.1)
88
98
  marcel (1.0.2)
89
99
  method_source (1.0.0)
90
- mini_mime (1.1.1)
91
- minitest (5.14.4)
100
+ mini_mime (1.1.2)
101
+ minitest (5.15.0)
102
+ net-imap (0.2.3)
103
+ digest
104
+ net-protocol
105
+ strscan
106
+ net-pop (0.1.1)
107
+ digest
108
+ net-protocol
109
+ timeout
110
+ net-protocol (0.1.2)
111
+ io-wait
112
+ timeout
113
+ net-smtp (0.3.1)
114
+ digest
115
+ net-protocol
116
+ timeout
92
117
  nio4r (2.5.8)
93
- nokogiri (1.12.5-x86_64-darwin)
118
+ nokogiri (1.13.1-x86_64-darwin)
94
119
  racc (~> 1.4)
95
- nokogiri (1.12.5-x86_64-linux)
120
+ nokogiri (1.13.1-x86_64-linux)
96
121
  racc (~> 1.4)
97
122
  parallel (1.21.0)
98
- parser (3.0.2.0)
123
+ parser (3.1.0.0)
99
124
  ast (~> 2.4.1)
100
125
  pry (0.14.1)
101
126
  coderay (~> 1.1)
102
127
  method_source (~> 1.0)
103
- racc (1.5.2)
128
+ racc (1.6.0)
104
129
  rack (2.2.3)
105
130
  rack-test (1.1.0)
106
131
  rack (>= 1.0, < 3)
107
- rails (6.1.4.1)
108
- actioncable (= 6.1.4.1)
109
- actionmailbox (= 6.1.4.1)
110
- actionmailer (= 6.1.4.1)
111
- actionpack (= 6.1.4.1)
112
- actiontext (= 6.1.4.1)
113
- actionview (= 6.1.4.1)
114
- activejob (= 6.1.4.1)
115
- activemodel (= 6.1.4.1)
116
- activerecord (= 6.1.4.1)
117
- activestorage (= 6.1.4.1)
118
- activesupport (= 6.1.4.1)
132
+ rails (7.0.1)
133
+ actioncable (= 7.0.1)
134
+ actionmailbox (= 7.0.1)
135
+ actionmailer (= 7.0.1)
136
+ actionpack (= 7.0.1)
137
+ actiontext (= 7.0.1)
138
+ actionview (= 7.0.1)
139
+ activejob (= 7.0.1)
140
+ activemodel (= 7.0.1)
141
+ activerecord (= 7.0.1)
142
+ activestorage (= 7.0.1)
143
+ activesupport (= 7.0.1)
119
144
  bundler (>= 1.15.0)
120
- railties (= 6.1.4.1)
121
- sprockets-rails (>= 2.0.0)
145
+ railties (= 7.0.1)
122
146
  rails-dom-testing (2.0.3)
123
147
  activesupport (>= 4.2.0)
124
148
  nokogiri (>= 1.6)
125
149
  rails-html-sanitizer (1.4.2)
126
150
  loofah (~> 2.3)
127
- railties (6.1.4.1)
128
- actionpack (= 6.1.4.1)
129
- activesupport (= 6.1.4.1)
151
+ railties (7.0.1)
152
+ actionpack (= 7.0.1)
153
+ activesupport (= 7.0.1)
130
154
  method_source
131
- rake (>= 0.13)
155
+ rake (>= 12.2)
132
156
  thor (~> 1.0)
133
- rainbow (3.0.0)
157
+ zeitwerk (~> 2.5)
158
+ rainbow (3.1.1)
134
159
  rake (13.0.6)
135
- redis (4.4.0)
136
- regexp_parser (2.1.1)
160
+ redis (4.6.0)
161
+ regexp_parser (2.2.0)
137
162
  rexml (3.2.5)
138
163
  rspec (3.10.0)
139
164
  rspec-core (~> 3.10.0)
140
165
  rspec-expectations (~> 3.10.0)
141
166
  rspec-mocks (~> 3.10.0)
142
- rspec-core (3.10.1)
167
+ rspec-core (3.10.2)
143
168
  rspec-support (~> 3.10.0)
144
- rspec-expectations (3.10.1)
169
+ rspec-expectations (3.10.2)
145
170
  diff-lcs (>= 1.2.0, < 2.0)
146
171
  rspec-support (~> 3.10.0)
147
- rspec-mocks (3.10.2)
172
+ rspec-mocks (3.10.3)
148
173
  diff-lcs (>= 1.2.0, < 2.0)
149
174
  rspec-support (~> 3.10.0)
150
- rspec-support (3.10.2)
151
- rubocop (1.17.0)
175
+ rspec-support (3.10.3)
176
+ rubocop (1.25.1)
152
177
  parallel (~> 1.10)
153
- parser (>= 3.0.0.0)
178
+ parser (>= 3.1.0.0)
154
179
  rainbow (>= 2.2.2, < 4.0)
155
180
  regexp_parser (>= 1.8, < 3.0)
156
181
  rexml
157
- rubocop-ast (>= 1.7.0, < 2.0)
182
+ rubocop-ast (>= 1.15.1, < 2.0)
158
183
  ruby-progressbar (~> 1.7)
159
184
  unicode-display_width (>= 1.4.0, < 3.0)
160
- rubocop-ast (1.12.0)
185
+ rubocop-ast (1.15.1)
161
186
  parser (>= 3.0.1.1)
162
- rubocop-config-umbrellio (1.17.0.53)
163
- rubocop (= 1.17.0)
164
- rubocop-performance (= 1.10.0)
165
- rubocop-rails (= 2.9.1)
166
- rubocop-rake (= 0.5.1)
167
- rubocop-rspec (= 2.2.0)
168
- rubocop-sequel (= 0.2.0)
169
- rubocop-performance (1.10.0)
170
- rubocop (>= 0.90.0, < 2.0)
187
+ rubocop-config-umbrellio (1.25.0.61)
188
+ rubocop (~> 1.25.0)
189
+ rubocop-performance (~> 1.13.0)
190
+ rubocop-rails (~> 2.13.0)
191
+ rubocop-rake (~> 0.6.0)
192
+ rubocop-rspec (~> 2.7.0)
193
+ rubocop-sequel (~> 0.3.3)
194
+ rubocop-performance (1.13.2)
195
+ rubocop (>= 1.7.0, < 2.0)
171
196
  rubocop-ast (>= 0.4.0)
172
- rubocop-rails (2.9.1)
197
+ rubocop-rails (2.13.2)
173
198
  activesupport (>= 4.2.0)
174
199
  rack (>= 1.1)
175
- rubocop (>= 0.90.0, < 2.0)
176
- rubocop-rake (0.5.1)
177
- rubocop
178
- rubocop-rspec (2.2.0)
200
+ rubocop (>= 1.7.0, < 2.0)
201
+ rubocop-rake (0.6.0)
179
202
  rubocop (~> 1.0)
180
- rubocop-ast (>= 1.1.0)
181
- rubocop-sequel (0.2.0)
203
+ rubocop-rspec (2.7.0)
204
+ rubocop (~> 1.19)
205
+ rubocop-sequel (0.3.3)
182
206
  rubocop (~> 1.0)
183
207
  ruby-progressbar (1.11.0)
184
208
  securerandom (0.1.1)
185
- sidekiq (6.2.2)
209
+ sidekiq (6.4.1)
186
210
  connection_pool (>= 2.2.2)
187
211
  rack (~> 2.0)
188
212
  redis (>= 4.2.0)
189
- sprockets (4.0.2)
190
- concurrent-ruby (~> 1.0)
191
- rack (> 1, < 3)
192
- sprockets-rails (3.2.2)
193
- actionpack (>= 4.0)
194
- activesupport (>= 4.0)
195
- sprockets (>= 3.0.0)
196
- thor (1.1.0)
213
+ strscan (3.0.1)
214
+ thor (1.2.1)
215
+ timeout (0.2.0)
197
216
  tzinfo (2.0.4)
198
217
  concurrent-ruby (~> 1.0)
199
218
  unicode-display_width (2.1.0)
200
219
  websocket-driver (0.7.5)
201
220
  websocket-extensions (>= 0.1.0)
202
221
  websocket-extensions (0.1.5)
203
- zeitwerk (2.4.2)
222
+ zeitwerk (2.5.4)
204
223
 
205
224
  PLATFORMS
206
225
  x86_64-darwin-20
data/README.md CHANGED
@@ -26,21 +26,28 @@ Use this example during application initialization process (this example impleme
26
26
  ```ruby
27
27
  Memolog.configure do |config|
28
28
  config.debug = false
29
- config.formatter = ::Memolog::Formatter.new
30
- config.initializers = %i[rails sidekiq]
29
+ config.formatter = ::Logger::Formatter.new
30
+ config.middlewares = %i[rails sidekiq]
31
+ config.log_json = false
31
32
  config.log_size_limit = 50_000
32
- config.uuid_callable = -> { SecureRandom.uuid }
33
33
  end
34
34
 
35
- Memolog.init!
35
+ Memolog.init_middlewares!
36
36
  ```
37
37
 
38
38
  Available options are:
39
39
  - `debug` - set it to true if you need to leave Memolog.dump result outside `Memolog.run {}` block.
40
40
  - `formatter` - setup your own formatter.
41
- - `initializers` - define here what you want to initialize in `#init!` call.
41
+ - `middlewares` - define here what you want to initialize in `#init_middlewares!` call.
42
+ - `log_json` - `#dump` will try to parse dump with `JSON.parse()`. Default is `false`
42
43
  - `log_size_limit` - max log length in `#dump`.
43
- - `uuid_callable` - Memolog add unique value to logs, here you can redefine uuid generation.
44
+
45
+ If you want to apply Sentry monkey patch that call `Memolog.dump` before `Sentry.capture_exception`
46
+ and `Sentry.capture_message` you can implement it via this code:
47
+
48
+ ```ruby
49
+ Sentry.prepend(Memolog::SentryExtension)
50
+ ```
44
51
 
45
52
  ## Usage
46
53
 
@@ -3,15 +3,15 @@
3
3
  Memolog::Config = Struct.new(
4
4
  :debug,
5
5
  :formatter,
6
- :initializers,
6
+ :middlewares,
7
+ :parse_json,
7
8
  :log_size_limit,
8
- :uuid_callable,
9
9
  ) do
10
10
  def initialize
11
11
  self.debug = false
12
- self.formatter = ::Memolog::Formatter.new
13
- self.initializers = %i[rails sidekiq]
12
+ self.formatter = ::Logger::Formatter.new
13
+ self.middlewares = %i[rails sidekiq]
14
+ self.parse_json = false
14
15
  self.log_size_limit = 50_000
15
- self.uuid_callable = -> { SecureRandom.uuid }
16
16
  end
17
17
  end
data/lib/memolog/init.rb CHANGED
@@ -1,24 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class Memolog::Init
4
- def call
3
+ module Memolog::Init
4
+ extend self
5
+
6
+ def init_middlewares!
5
7
  init_rails_middleware!
6
8
  init_sidekiq_middleware!
7
9
  end
8
10
 
9
- private
10
-
11
11
  def init_rails_middleware!
12
- return unless Memolog.config.initializers.include?(:rails)
13
- return unless Object.const_defined?("Rails")
14
- return if Object.const_defined?("Sidekiq") && Sidekiq.server?
12
+ return unless Memolog.config.middlewares.include?(:rails)
13
+ return unless Object.const_defined?(:Rails)
14
+ return if Object.const_defined?(:Sidekiq) && Sidekiq.server?
15
15
 
16
16
  Rails.application.middleware.insert_before(0, Memolog::RailsMiddleware)
17
17
  end
18
18
 
19
19
  def init_sidekiq_middleware!
20
- return unless Memolog.config.initializers.include?(:sidekiq)
21
- return unless Object.const_defined?("Sidekiq")
20
+ return unless Memolog.config.middlewares.include?(:sidekiq)
21
+ return unless Object.const_defined?(:Sidekiq)
22
22
 
23
23
  Sidekiq.configure_server do |config|
24
24
  config.server_middleware do |chain|
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Memolog::Extension
3
+ module Memolog::LoggerExtension
4
4
  def add(*args, &block)
5
5
  Memolog.logger.log(*args, &block)
6
6
  super
@@ -18,7 +18,7 @@ module Memolog::SentryExtension
18
18
 
19
19
  def set_extras_memolog!
20
20
  return unless get_current_scope
21
- set_extras(Memolog.config.sentry_key => Memolog.dump)
21
+ set_extras(memolog: Memolog.dump)
22
22
  end
23
23
  end
24
24
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Memolog
4
- VERSION = "0.3.2"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/memolog.rb CHANGED
@@ -3,12 +3,12 @@
3
3
  require "logger"
4
4
  require "securerandom"
5
5
  require "stringio"
6
+ require "json"
6
7
 
7
8
  require "memolog/version"
8
9
  require "memolog/config"
9
- require "memolog/extension"
10
- require "memolog/formatter"
11
10
  require "memolog/init"
11
+ require "memolog/logger_extension"
12
12
  require "memolog/rails_middleware"
13
13
  require "memolog/sentry_extension"
14
14
  require "memolog/sidekiq_middleware"
@@ -24,17 +24,12 @@ module Memolog
24
24
  yield(config) if block_given?
25
25
  end
26
26
 
27
- def init!
28
- Memolog::Init.new.call
27
+ def init_middlewares!
28
+ Memolog::Init.init_middlewares!
29
29
  end
30
30
 
31
31
  def extend_logger(other_logger)
32
- other_logger.extend(Memolog::Extension)
33
- other_logger.formatter = config.formatter
34
- end
35
-
36
- def uuid
37
- Thread.current[:memolog_uuid]
32
+ other_logger.extend(Memolog::LoggerExtension)
38
33
  end
39
34
 
40
35
  def logger
@@ -46,8 +41,6 @@ module Memolog
46
41
  end
47
42
 
48
43
  def run
49
- Thread.current[:memolog_uuid] = config.uuid_callable.call
50
-
51
44
  logdevs.push(StringIO.new)
52
45
  logger.instance_variable_set(:@logdev, logdevs.last)
53
46
 
@@ -62,6 +55,10 @@ module Memolog
62
55
  beginning = logdevs.last.string.length - config.log_size_limit
63
56
  beginning = 0 if beginning.negative?
64
57
 
65
- logdevs.last.string.slice(beginning, config.log_size_limit).presence
58
+ dump = logdevs.last.string.slice(beginning, config.log_size_limit).presence
59
+
60
+ config.parse_json ? JSON.parse(dump) : dump
61
+ rescue JSON::ParserError
62
+ dump
66
63
  end
67
64
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memolog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stepan Kirushkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-22 00:00:00.000000000 Z
11
+ date: 2022-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: logger
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -61,9 +75,8 @@ files:
61
75
  - bin/setup
62
76
  - lib/memolog.rb
63
77
  - lib/memolog/config.rb
64
- - lib/memolog/extension.rb
65
- - lib/memolog/formatter.rb
66
78
  - lib/memolog/init.rb
79
+ - lib/memolog/logger_extension.rb
67
80
  - lib/memolog/rails_middleware.rb
68
81
  - lib/memolog/sentry_extension.rb
69
82
  - lib/memolog/sidekiq_middleware.rb
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Memolog::Formatter < Logger::Formatter
4
- def call(severity, time, _progname, msg)
5
- format(
6
- Format,
7
- severity[0..0],
8
- format_datetime(time),
9
- $PID,
10
- severity,
11
- Memolog.uuid,
12
- msg2str(msg),
13
- )
14
- end
15
- end