For a while, I have noticed that my development logs are full of exceptions
like the following, which cause a lot of noise:
```
WORKSPACE/openstreetmap-website/lib/osm_community_index.rb:44:in
'Kernel#format': key{مجتمع} not found ([38;2;190;132;255m1;4mKeyError)
from WORKSPACE/openstreetmap-website/lib/osm_community_index.rb:44:in
'OsmCommunityIndex.resolve_name'
from WORKSPACE/openstreetmap-website/lib/osm_community_index.rb:24:in
'block (2 levels) in OsmCommunityIndex.add_to_i18n'
from
RUBY_INSTALL/ruby/4.0.1/lib/ruby/gems/4.0.0/gems/frozen_record-0.27.4/lib/frozen_record/scope.rb:248:in
'Array#each'
from
RUBY_INSTALL/ruby/4.0.1/lib/ruby/gems/4.0.0/gems/frozen_record-0.27.4/lib/frozen_record/scope.rb:248:in
'Enumerable#each_with_object'
from
RUBY_INSTALL/ruby/4.0.1/lib/ruby/gems/4.0.0/gems/frozen_record-0.27.4/lib/frozen_record/scope.rb:248:in
'Kernel#public_send'
from
RUBY_INSTALL/ruby/4.0.1/lib/ruby/gems/4.0.0/gems/frozen_record-0.27.4/lib/frozen_record/scope.rb:248:in
'FrozenRecord::Scope#method_missing'
from WORKSPACE/openstreetmap-website/lib/osm_community_index.rb:20:in
'block in OsmCommunityIndex.add_to_i18n'
from WORKSPACE/openstreetmap-website/lib/osm_community_index.rb:14:in
'Array#each'
from WORKSPACE/openstreetmap-website/lib/osm_community_index.rb:14:in
'OsmCommunityIndex.add_to_i18n'
from
WORKSPACE/openstreetmap-website/config/initializers/osm_community_index.rb:4:in
'block in <main>'
(...to a total of about 60 frames per instance...)
```
This change reduces the logging to something more manageable and, I hope,
descriptive. I think! My description of the issue might be wrong, please let me
know.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/6847
-- Commit Summary --
* Avoid polluting the logs with non-descriptive exceptions
-- File Changes --
M lib/osm_community_index.rb (6)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/6847.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6847.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6847
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev