rails_log_parser 0.1.0 → 0.1.1

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: dfd1e54a158c7a2cc3b5bd53a9fb5ac06cacdf382a29f880e909c635743d6308
4
- data.tar.gz: b3d793c3521b0d876d171609f37e1221d0424021efec07449858ebb8857769c4
3
+ metadata.gz: 59f2cecd17282601e421146cbc3f56ecbcd43ff80f4d0c185b9d69ed3c4e87da
4
+ data.tar.gz: 19ccf45898021054f56aca3120ccb48935957776a16d471b8b866405c07fe213
5
5
  SHA512:
6
- metadata.gz: e3fed27137397bdfe32fb495e6dac47bf80331ff2e8338d9783455f613ec8d4a1a82ea659859be2b6733582e7c06bca47c792767b361eec0b04900bf4fcb7cea
7
- data.tar.gz: 060ef71dd6a770e743000b2858953d402eeaa2a887da5ea9e1a42b50418b0a805638d7853e4d6b5d627eae2b673e1d5dabc1c9517806947cb9e344df7b7882b6
6
+ metadata.gz: 75b0403a21883f6c33e1fa5549c3d68595aba2cda0aa6d224d1ffd78cb26ac0d2cae846be47eb1a27d09f81074d9f98ae1bb5f63fae42a3f49814fd568a75a59
7
+ data.tar.gz: f501325e523eaad291612798d05ea10322e3b2c30247308b37a7b010847f162b348c3fd115aaac1bcbdba933224cbe3e1862eea8cc54d76b9e1fc396453f9d87
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ * Use the exception as headline of errors instead of an empty line, also with further log tags
6
+ (`config.log_tags = %i[uuid domain]`)
7
+
3
8
  ## 0.1.0
4
9
 
5
10
  * Drop `enumerize`, `json` and `rails` dependencies, only `activesupport` is required
@@ -13,12 +13,13 @@ class RailsLogParser::Line
13
13
  def parse
14
14
  return if line.empty?
15
15
 
16
- # empty log line
16
+ # empty log line, optionally with further log tags (config.log_tags = %i[uuid domain])
17
17
  match = line.match(/
18
18
  \A(?<severity_id>[DIWEFU]),\s # I,
19
19
  \[(?<datetime>[^\]]+)\s\#(?<pid>\d+)\]\s+ # [2021-11-26T13:11:01.255168 #10158]
20
20
  (?<severity_label>[A-Z]+)\s+--\s+[^:]*:\s+ # INFO -- :
21
- \[(?<id>[a-f0-9-]{36})\]\s* # [b42b65ab-7985-4bc2-a5b5-1fb23e6ad940]
21
+ \[(?<id>[a-f0-9-]{36})\] # [b42b65ab-7985-4bc2-a5b5-1fb23e6ad940]
22
+ (?:\s+\[[^\]]*\])*\s* # [example.com]
22
23
  \z/x)
23
24
  if match
24
25
  parser.empty_line(match)
@@ -114,6 +114,8 @@ class RailsLogParser::Parser
114
114
  def add_message(params)
115
115
  # continuation of a request which started before the beginning of the log
116
116
  return if @actions[params['id']].nil?
117
+ # empty continuation line, optionally with further log tags (config.log_tags = %i[uuid domain])
118
+ return if params['message'].match?(/\A(?:\[[^\]]*\]\s*)*\z/)
117
119
 
118
120
  @actions[params['id']].add_message(params['message'])
119
121
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_log_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Limbach
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-10-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -55,7 +54,6 @@ metadata:
55
54
  source_code_uri: https://github.com/Lichtbit/rails_log_parser
56
55
  changelog_uri: https://github.com/Lichtbit/rails_log_parser/blob/master/CHANGELOG.md
57
56
  rubygems_mfa_required: 'true'
58
- post_install_message:
59
57
  rdoc_options: []
60
58
  require_paths:
61
59
  - lib
@@ -70,8 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
68
  - !ruby/object:Gem::Version
71
69
  version: '0'
72
70
  requirements: []
73
- rubygems_version: 3.4.20
74
- signing_key:
71
+ rubygems_version: 4.0.20
75
72
  specification_version: 4
76
73
  summary: Simple and fast analysing of default rails logs
77
74
  test_files: []