rrx_logging 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 75914acb9362c2abb51b05e5e95d2d1e509267bce0ee44bb93505740ec92ff33
4
+ data.tar.gz: 66b61b0abd08e58dc5cdab35d7342207133e6bf8592da47b63e1223bb49f39ce
5
+ SHA512:
6
+ metadata.gz: 56f25afe7f6cb8f3c86d5e51244fea9a93ba8ec393211d448293ae2b5560d2a76df628c66df02d779079e58381144b9e0c25a08816fceb74d088c176b36e9208
7
+ data.tar.gz: 7f513e8c15e75a98a54bae8e0fd6668dd054a5855f37343c88e2a22cc7782020383ec0f6273b3756b42d5c66e43b6fb2945de027236d12d660d19d6b96adef3c
data/.editorconfig ADDED
@@ -0,0 +1,109 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_size = 2
7
+ indent_style = space
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+ max_line_length = 120
11
+ tab_width = 2
12
+ ij_continuation_indent_size = 4
13
+ ij_formatter_off_tag = @formatter:off
14
+ ij_formatter_on_tag = @formatter:on
15
+ ij_formatter_tags_enabled = true
16
+ ij_smart_tabs = false
17
+ ij_visual_guides =
18
+ ij_wrap_on_typing = false
19
+
20
+ [.editorconfig]
21
+ ij_editorconfig_align_group_field_declarations = false
22
+ ij_editorconfig_space_after_colon = false
23
+ ij_editorconfig_space_after_comma = true
24
+ ij_editorconfig_space_before_colon = false
25
+ ij_editorconfig_space_before_comma = false
26
+ ij_editorconfig_spaces_around_assignment_operators = true
27
+
28
+ [{*.bash,*.sh,*.zsh}]
29
+ ij_shell_binary_ops_start_line = false
30
+ ij_shell_keep_column_alignment_padding = false
31
+ ij_shell_minify_program = false
32
+ ij_shell_redirect_followed_by_space = false
33
+ ij_shell_switch_cases_indented = false
34
+ ij_shell_use_unix_line_separator = true
35
+
36
+ [{*.gemspec,*.jbuilder,*.rake,*.rb,*.rbi,*.rbw,*.ru,*.thor,.simplecov,capfile,gemfile,guardfile,isolate,rakefile,steepfile,vagrantfile}]
37
+ ij_ruby_align_group_field_declarations = true
38
+ ij_ruby_align_multiline_parameters = true
39
+ ij_ruby_blank_lines_around_class = 1
40
+ ij_ruby_blank_lines_around_method = 1
41
+ ij_ruby_chain_calls_alignment = 2
42
+ ij_ruby_convert_brace_block_by_enter = true
43
+ ij_ruby_empty_declarations_style = 1
44
+ ij_ruby_force_newlines_around_visibility_mods = true
45
+ ij_ruby_indent_private_methods = false
46
+ ij_ruby_indent_protected_methods = false
47
+ ij_ruby_indent_public_methods = false
48
+ ij_ruby_indent_visibility_modifiers = true
49
+ ij_ruby_indent_when_cases = false
50
+ ij_ruby_keep_blank_lines_in_code = 1
51
+ ij_ruby_keep_blank_lines_in_declarations = 1
52
+ ij_ruby_keep_line_breaks = true
53
+ ij_ruby_parentheses_around_method_arguments = true
54
+ ij_ruby_spaces_around_assignment_operators = true
55
+ ij_ruby_spaces_around_hashrocket = true
56
+ ij_ruby_spaces_around_other_operators = true
57
+ ij_ruby_spaces_around_pow_operators = true
58
+ ij_ruby_spaces_around_range_operators = false
59
+ ij_ruby_spaces_around_relational_operators = true
60
+ ij_ruby_spaces_within_array_initializer_braces = true
61
+ ij_ruby_spaces_within_braces = true
62
+ ij_ruby_spaces_within_pipes = false
63
+ ij_ruby_use_external_formatter = false
64
+
65
+ [{*.har,*.json}]
66
+ ij_json_array_wrapping = split_into_lines
67
+ ij_json_keep_blank_lines_in_code = 0
68
+ ij_json_keep_indents_on_empty_lines = false
69
+ ij_json_keep_line_breaks = true
70
+ ij_json_keep_trailing_comma = false
71
+ ij_json_object_wrapping = split_into_lines
72
+ ij_json_property_alignment = do_not_align
73
+ ij_json_space_after_colon = true
74
+ ij_json_space_after_comma = true
75
+ ij_json_space_before_colon = false
76
+ ij_json_space_before_comma = false
77
+ ij_json_spaces_within_braces = false
78
+ ij_json_spaces_within_brackets = false
79
+ ij_json_wrap_long_lines = false
80
+
81
+ [{*.markdown,*.md}]
82
+ ij_markdown_force_one_space_after_blockquote_symbol = true
83
+ ij_markdown_force_one_space_after_header_symbol = true
84
+ ij_markdown_force_one_space_after_list_bullet = true
85
+ ij_markdown_force_one_space_between_words = true
86
+ ij_markdown_format_tables = true
87
+ ij_markdown_insert_quote_arrows_on_wrap = true
88
+ ij_markdown_keep_indents_on_empty_lines = false
89
+ ij_markdown_keep_line_breaks_inside_text_blocks = true
90
+ ij_markdown_max_lines_around_block_elements = 1
91
+ ij_markdown_max_lines_around_header = 1
92
+ ij_markdown_max_lines_between_paragraphs = 1
93
+ ij_markdown_min_lines_around_block_elements = 1
94
+ ij_markdown_min_lines_around_header = 1
95
+ ij_markdown_min_lines_between_paragraphs = 1
96
+ ij_markdown_wrap_text_if_long = true
97
+ ij_markdown_wrap_text_inside_blockquotes = true
98
+
99
+ [{*.yaml,*.yml}]
100
+ ij_yaml_align_values_properties = do_not_align
101
+ ij_yaml_autoinsert_sequence_marker = true
102
+ ij_yaml_block_mapping_on_new_line = false
103
+ ij_yaml_indent_sequence_value = true
104
+ ij_yaml_keep_indents_on_empty_lines = false
105
+ ij_yaml_keep_line_breaks = true
106
+ ij_yaml_sequence_on_new_line = false
107
+ ij_yaml_space_before_colon = false
108
+ ij_yaml_spaces_within_braces = true
109
+ ij_yaml_spaces_within_brackets = true
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="RbsMissingTypeSignature" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
5
+ </profile>
6
+ </component>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/rrx_logging.iml" filepath="$PROJECT_DIR$/.idea/rrx_logging.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,178 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="Remote-asdf: ruby-3.2.2 (-p53" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="module-library">
15
+ <library name="rrx_dev (v0.1.0) [path][gem]" type="rubylib">
16
+ <properties>
17
+ <option name="version" value="4" />
18
+ </properties>
19
+ <CLASSES>
20
+ <root url="file://$MODULE_DIR$/../rrx_dev/bin" />
21
+ <root url="file://$MODULE_DIR$/../rrx_dev/exe" />
22
+ <root url="file://$MODULE_DIR$/../rrx_dev/lib" />
23
+ <root url="file://$MODULE_DIR$/../rrx_dev/pkg" />
24
+ <root url="file://$MODULE_DIR$/../rrx_dev/sig" />
25
+ <root url="file://$MODULE_DIR$/../rrx_dev/.git" />
26
+ <root url="file://$MODULE_DIR$/../rrx_dev/spec" />
27
+ <root url="file://$MODULE_DIR$/../rrx_dev/.idea" />
28
+ <root url="file://$MODULE_DIR$/../rrx_dev/config" />
29
+ </CLASSES>
30
+ <JAVADOC />
31
+ <SOURCES>
32
+ <root url="file://$MODULE_DIR$/../rrx_dev/bin" />
33
+ <root url="file://$MODULE_DIR$/../rrx_dev/exe" />
34
+ <root url="file://$MODULE_DIR$/../rrx_dev/lib" />
35
+ <root url="file://$MODULE_DIR$/../rrx_dev/pkg" />
36
+ <root url="file://$MODULE_DIR$/../rrx_dev/sig" />
37
+ <root url="file://$MODULE_DIR$/../rrx_dev/.git" />
38
+ <root url="file://$MODULE_DIR$/../rrx_dev/spec" />
39
+ <root url="file://$MODULE_DIR$/../rrx_dev/.idea" />
40
+ <root url="file://$MODULE_DIR$/../rrx_dev/config" />
41
+ </SOURCES>
42
+ <excluded>
43
+ <root url="file://$MODULE_DIR$/../rrx_dev/bin" />
44
+ <root url="file://$MODULE_DIR$/../rrx_dev/exe" />
45
+ <root url="file://$MODULE_DIR$/../rrx_dev/pkg" />
46
+ <root url="file://$MODULE_DIR$/../rrx_dev/.git" />
47
+ <root url="file://$MODULE_DIR$/../rrx_dev/spec" />
48
+ <root url="file://$MODULE_DIR$/../rrx_dev/.idea" />
49
+ </excluded>
50
+ </library>
51
+ </orderEntry>
52
+ <orderEntry type="library" scope="PROVIDED" name="actionpack (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="actionview (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="active_record_query_trace (v1.8.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="activemodel (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="activerecord (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="activesupport (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="addressable (v2.8.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
60
+ <orderEntry type="library" scope="PROVIDED" name="base64 (v0.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="bigdecimal (v3.1.5, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
62
+ <orderEntry type="library" scope="PROVIDED" name="binding_of_caller (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
63
+ <orderEntry type="library" scope="PROVIDED" name="bootsnap (v1.17.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
64
+ <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
65
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.10, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
66
+ <orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
67
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.2.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
68
+ <orderEntry type="library" scope="PROVIDED" name="connection_pool (v2.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
69
+ <orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
70
+ <orderEntry type="library" scope="PROVIDED" name="debug (v1.9.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
71
+ <orderEntry type="library" scope="PROVIDED" name="debug_inspector (v1.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
72
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
73
+ <orderEntry type="library" scope="PROVIDED" name="drb (v2.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
74
+ <orderEntry type="library" scope="PROVIDED" name="erubi (v1.12.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
75
+ <orderEntry type="library" scope="PROVIDED" name="factory_bot (v6.4.5, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
76
+ <orderEntry type="library" scope="PROVIDED" name="factory_bot_rails (v6.4.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
77
+ <orderEntry type="library" scope="PROVIDED" name="ffi (v1.16.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
78
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.14.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
79
+ <orderEntry type="library" scope="PROVIDED" name="io-console (v0.7.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
80
+ <orderEntry type="library" scope="PROVIDED" name="irb (v1.11.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
81
+ <orderEntry type="library" scope="PROVIDED" name="json (v2.7.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
82
+ <orderEntry type="library" scope="PROVIDED" name="json-schema (v4.1.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
83
+ <orderEntry type="library" scope="PROVIDED" name="language_server-protocol (v3.17.0.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
84
+ <orderEntry type="library" scope="PROVIDED" name="listen (v3.8.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
85
+ <orderEntry type="library" scope="PROVIDED" name="loofah (v2.22.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
86
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.20.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
87
+ <orderEntry type="library" scope="PROVIDED" name="msgpack (v1.7.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
88
+ <orderEntry type="library" scope="PROVIDED" name="mutex_m (v0.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
89
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.16.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
90
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.24.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
91
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.2.2.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
92
+ <orderEntry type="library" scope="PROVIDED" name="proc_to_ast (v0.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
93
+ <orderEntry type="library" scope="PROVIDED" name="psych (v5.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
94
+ <orderEntry type="library" scope="PROVIDED" name="public_suffix (v5.0.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
95
+ <orderEntry type="library" scope="PROVIDED" name="racc (v1.7.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
96
+ <orderEntry type="library" scope="PROVIDED" name="rack (v3.0.8, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
97
+ <orderEntry type="library" scope="PROVIDED" name="rack-session (v2.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
98
+ <orderEntry type="library" scope="PROVIDED" name="rack-test (v2.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
99
+ <orderEntry type="library" scope="PROVIDED" name="rackup (v2.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
100
+ <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
101
+ <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.6.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
102
+ <orderEntry type="library" scope="PROVIDED" name="railties (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
103
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
104
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
105
+ <orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.11.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
106
+ <orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.10.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
107
+ <orderEntry type="library" scope="PROVIDED" name="rdoc (v6.6.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
108
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.8.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
109
+ <orderEntry type="library" scope="PROVIDED" name="reline (v0.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
110
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
111
+ <orderEntry type="library" scope="PROVIDED" name="rrx_config (v0.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
112
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.12.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
113
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.12.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
114
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.12.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
115
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.12.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
116
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
117
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized-core (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
118
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized-table_syntax (v1.0.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
119
+ <orderEntry type="library" scope="PROVIDED" name="rspec-rails (v6.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
120
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.12.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
121
+ <orderEntry type="library" scope="PROVIDED" name="rswag-specs (v2.13.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
122
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.59.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
123
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.30.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
124
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-rails (v2.23.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
125
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
126
+ <orderEntry type="library" scope="PROVIDED" name="spring (v4.1.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
127
+ <orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.7.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
128
+ <orderEntry type="library" scope="PROVIDED" name="stringio (v3.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
129
+ <orderEntry type="library" scope="PROVIDED" name="thor (v1.3.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
130
+ <orderEntry type="library" scope="PROVIDED" name="timeout (v0.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
131
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
132
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.5.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
133
+ <orderEntry type="library" scope="PROVIDED" name="unparser (v0.6.10, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
134
+ <orderEntry type="library" scope="PROVIDED" name="webrick (v1.8.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
135
+ <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.6.12, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
136
+ </component>
137
+ <component name="RakeTasksCache">
138
+ <option name="myRootTask">
139
+ <RakeTaskImpl id="rake">
140
+ <subtasks>
141
+ <RakeTaskImpl description="Build rrx_logging-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
142
+ <RakeTaskImpl id="build">
143
+ <subtasks>
144
+ <RakeTaskImpl description="Generate SHA512 checksum if rrx_logging-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
145
+ </subtasks>
146
+ </RakeTaskImpl>
147
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
148
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
149
+ <RakeTaskImpl description="Build and install rrx_logging-0.1.0.gem into system gems" fullCommand="install" id="install" />
150
+ <RakeTaskImpl id="install">
151
+ <subtasks>
152
+ <RakeTaskImpl description="Build and install rrx_logging-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
153
+ </subtasks>
154
+ </RakeTaskImpl>
155
+ <RakeTaskImpl description="Create tag v0.1.0 and build and push rrx_logging-0.1.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
156
+ <RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
157
+ <RakeTaskImpl id="rubocop">
158
+ <subtasks>
159
+ <RakeTaskImpl description="Autocorrect RuboCop offenses (only when it's safe)" fullCommand="rubocop:autocorrect" id="autocorrect" />
160
+ <RakeTaskImpl description="Autocorrect RuboCop offenses (safe and unsafe)" fullCommand="rubocop:autocorrect_all" id="autocorrect_all" />
161
+ <RakeTaskImpl description="" fullCommand="rubocop:auto_correct" id="auto_correct" />
162
+ </subtasks>
163
+ </RakeTaskImpl>
164
+ <RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
165
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
166
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
167
+ <RakeTaskImpl id="release">
168
+ <subtasks>
169
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
170
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
171
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
172
+ </subtasks>
173
+ </RakeTaskImpl>
174
+ </subtasks>
175
+ </RakeTaskImpl>
176
+ </option>
177
+ </component>
178
+ </module>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require rails_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ inherit_gem:
2
+ rrx_dev: config/rubocop.yml
3
+
4
+ ##
5
+ # Add project specific cops below
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at dan.drew@hotmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gemspec
5
+
6
+ gem 'rrx_dev', path: '../rrx_dev'
data/Gemfile.lock ADDED
@@ -0,0 +1,244 @@
1
+ PATH
2
+ remote: ../rrx_dev
3
+ specs:
4
+ rrx_dev (0.1.1)
5
+ active_record_query_trace
6
+ activesupport (~> 7.1.0)
7
+ bootsnap
8
+ debug
9
+ factory_bot_rails
10
+ listen
11
+ railties (~> 7.1.0)
12
+ rake (>= 13.0)
13
+ rspec (>= 3.0)
14
+ rspec-parameterized
15
+ rspec-rails
16
+ rswag-specs
17
+ rubocop (>= 1.21)
18
+ rubocop-rails
19
+ spring
20
+ thor
21
+
22
+ PATH
23
+ remote: .
24
+ specs:
25
+ rrx_logging (0.1.0)
26
+ activesupport
27
+ railties
28
+ rrx_config
29
+
30
+ GEM
31
+ remote: https://rubygems.org/
32
+ specs:
33
+ actionpack (7.1.2)
34
+ actionview (= 7.1.2)
35
+ activesupport (= 7.1.2)
36
+ nokogiri (>= 1.8.5)
37
+ racc
38
+ rack (>= 2.2.4)
39
+ rack-session (>= 1.0.1)
40
+ rack-test (>= 0.6.3)
41
+ rails-dom-testing (~> 2.2)
42
+ rails-html-sanitizer (~> 1.6)
43
+ actionview (7.1.2)
44
+ activesupport (= 7.1.2)
45
+ builder (~> 3.1)
46
+ erubi (~> 1.11)
47
+ rails-dom-testing (~> 2.2)
48
+ rails-html-sanitizer (~> 1.6)
49
+ active_record_query_trace (1.8.2)
50
+ activerecord (>= 6.0.0)
51
+ activemodel (7.1.2)
52
+ activesupport (= 7.1.2)
53
+ activerecord (7.1.2)
54
+ activemodel (= 7.1.2)
55
+ activesupport (= 7.1.2)
56
+ timeout (>= 0.4.0)
57
+ activesupport (7.1.2)
58
+ base64
59
+ bigdecimal
60
+ concurrent-ruby (~> 1.0, >= 1.0.2)
61
+ connection_pool (>= 2.2.5)
62
+ drb
63
+ i18n (>= 1.6, < 2)
64
+ minitest (>= 5.1)
65
+ mutex_m
66
+ tzinfo (~> 2.0)
67
+ addressable (2.8.6)
68
+ public_suffix (>= 2.0.2, < 6.0)
69
+ ast (2.4.2)
70
+ base64 (0.2.0)
71
+ bigdecimal (3.1.5)
72
+ binding_of_caller (1.0.0)
73
+ debug_inspector (>= 0.0.1)
74
+ bootsnap (1.17.0)
75
+ msgpack (~> 1.2)
76
+ builder (3.2.4)
77
+ coderay (1.1.3)
78
+ concurrent-ruby (1.2.2)
79
+ connection_pool (2.4.1)
80
+ crass (1.0.6)
81
+ debug (1.9.1)
82
+ irb (~> 1.10)
83
+ reline (>= 0.3.8)
84
+ debug_inspector (1.2.0)
85
+ diff-lcs (1.5.0)
86
+ drb (2.2.0)
87
+ ruby2_keywords
88
+ erubi (1.12.0)
89
+ factory_bot (6.4.5)
90
+ activesupport (>= 5.0.0)
91
+ factory_bot_rails (6.4.3)
92
+ factory_bot (~> 6.4)
93
+ railties (>= 5.0.0)
94
+ ffi (1.16.3)
95
+ i18n (1.14.1)
96
+ concurrent-ruby (~> 1.0)
97
+ io-console (0.7.1)
98
+ irb (1.11.0)
99
+ rdoc
100
+ reline (>= 0.3.8)
101
+ json (2.7.1)
102
+ json-schema (4.1.1)
103
+ addressable (>= 2.8)
104
+ language_server-protocol (3.17.0.3)
105
+ listen (3.8.0)
106
+ rb-fsevent (~> 0.10, >= 0.10.3)
107
+ rb-inotify (~> 0.9, >= 0.9.10)
108
+ loofah (2.22.0)
109
+ crass (~> 1.0.2)
110
+ nokogiri (>= 1.12.0)
111
+ minitest (5.20.0)
112
+ msgpack (1.7.2)
113
+ mutex_m (0.2.0)
114
+ nokogiri (1.16.0-x86_64-linux)
115
+ racc (~> 1.4)
116
+ parallel (1.24.0)
117
+ parser (3.2.2.4)
118
+ ast (~> 2.4.1)
119
+ racc
120
+ proc_to_ast (0.1.0)
121
+ coderay
122
+ parser
123
+ unparser
124
+ psych (5.1.2)
125
+ stringio
126
+ public_suffix (5.0.4)
127
+ racc (1.7.3)
128
+ rack (3.0.8)
129
+ rack-session (2.0.0)
130
+ rack (>= 3.0.0)
131
+ rack-test (2.1.0)
132
+ rack (>= 1.3)
133
+ rackup (2.1.0)
134
+ rack (>= 3)
135
+ webrick (~> 1.8)
136
+ rails-dom-testing (2.2.0)
137
+ activesupport (>= 5.0.0)
138
+ minitest
139
+ nokogiri (>= 1.6)
140
+ rails-html-sanitizer (1.6.0)
141
+ loofah (~> 2.21)
142
+ nokogiri (~> 1.14)
143
+ railties (7.1.2)
144
+ actionpack (= 7.1.2)
145
+ activesupport (= 7.1.2)
146
+ irb
147
+ rackup (>= 1.0.0)
148
+ rake (>= 12.2)
149
+ thor (~> 1.0, >= 1.2.2)
150
+ zeitwerk (~> 2.6)
151
+ rainbow (3.1.1)
152
+ rake (13.1.0)
153
+ rb-fsevent (0.11.2)
154
+ rb-inotify (0.10.1)
155
+ ffi (~> 1.0)
156
+ rdoc (6.6.2)
157
+ psych (>= 4.0.0)
158
+ regexp_parser (2.8.3)
159
+ reline (0.4.1)
160
+ io-console (~> 0.5)
161
+ rexml (3.2.6)
162
+ rrx_config (0.1.0)
163
+ railties
164
+ rspec (3.12.0)
165
+ rspec-core (~> 3.12.0)
166
+ rspec-expectations (~> 3.12.0)
167
+ rspec-mocks (~> 3.12.0)
168
+ rspec-core (3.12.2)
169
+ rspec-support (~> 3.12.0)
170
+ rspec-expectations (3.12.3)
171
+ diff-lcs (>= 1.2.0, < 2.0)
172
+ rspec-support (~> 3.12.0)
173
+ rspec-mocks (3.12.6)
174
+ diff-lcs (>= 1.2.0, < 2.0)
175
+ rspec-support (~> 3.12.0)
176
+ rspec-parameterized (1.0.0)
177
+ rspec-parameterized-core (< 2)
178
+ rspec-parameterized-table_syntax (< 2)
179
+ rspec-parameterized-core (1.0.0)
180
+ parser
181
+ proc_to_ast
182
+ rspec (>= 2.13, < 4)
183
+ unparser
184
+ rspec-parameterized-table_syntax (1.0.1)
185
+ binding_of_caller
186
+ rspec-parameterized-core (< 2)
187
+ rspec-rails (6.1.0)
188
+ actionpack (>= 6.1)
189
+ activesupport (>= 6.1)
190
+ railties (>= 6.1)
191
+ rspec-core (~> 3.12)
192
+ rspec-expectations (~> 3.12)
193
+ rspec-mocks (~> 3.12)
194
+ rspec-support (~> 3.12)
195
+ rspec-support (3.12.1)
196
+ rswag-specs (2.13.0)
197
+ activesupport (>= 3.1, < 7.2)
198
+ json-schema (>= 2.2, < 5.0)
199
+ railties (>= 3.1, < 7.2)
200
+ rspec-core (>= 2.14)
201
+ rubocop (1.59.0)
202
+ json (~> 2.3)
203
+ language_server-protocol (>= 3.17.0)
204
+ parallel (~> 1.10)
205
+ parser (>= 3.2.2.4)
206
+ rainbow (>= 2.2.2, < 4.0)
207
+ regexp_parser (>= 1.8, < 3.0)
208
+ rexml (>= 3.2.5, < 4.0)
209
+ rubocop-ast (>= 1.30.0, < 2.0)
210
+ ruby-progressbar (~> 1.7)
211
+ unicode-display_width (>= 2.4.0, < 3.0)
212
+ rubocop-ast (1.30.0)
213
+ parser (>= 3.2.1.0)
214
+ rubocop-rails (2.23.1)
215
+ activesupport (>= 4.2.0)
216
+ rack (>= 1.1)
217
+ rubocop (>= 1.33.0, < 2.0)
218
+ rubocop-ast (>= 1.30.0, < 2.0)
219
+ ruby-progressbar (1.13.0)
220
+ ruby2_keywords (0.0.5)
221
+ spring (4.1.3)
222
+ sqlite3 (1.7.0-x86_64-linux)
223
+ stringio (3.1.0)
224
+ thor (1.3.0)
225
+ timeout (0.4.1)
226
+ tzinfo (2.0.6)
227
+ concurrent-ruby (~> 1.0)
228
+ unicode-display_width (2.5.0)
229
+ unparser (0.6.10)
230
+ diff-lcs (~> 1.3)
231
+ parser (>= 3.2.2.4)
232
+ webrick (1.8.1)
233
+ zeitwerk (2.6.12)
234
+
235
+ PLATFORMS
236
+ x86_64-linux
237
+
238
+ DEPENDENCIES
239
+ rrx_dev!
240
+ rrx_logging!
241
+ sqlite3
242
+
243
+ BUNDLED WITH
244
+ 2.4.10
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Dan Drew
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # RrxLogging
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rrx_logging`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rrx_logging. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/rrx_logging/blob/main/CODE_OF_CONDUCT.md).
32
+
33
+ ## License
34
+
35
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
36
+
37
+ ## Code of Conduct
38
+
39
+ Everyone interacting in the RrxLogging project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rrx_logging/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RrxLogging
4
+ class Current < ActiveSupport::CurrentAttributes
5
+ # @return [RrxLogging::Logger]
6
+ attribute :logger
7
+ end
8
+ end
9
+
10
+ ActiveSupport::Notifications.subscribe 'start_processing.action_controller' do |event|
11
+ # @type [Hash<Symbol>]
12
+ payload = event.payload
13
+ # @type [RrxLogging::Logger]
14
+ rails_logger = Rails.logger
15
+ name, request = payload.values_at(:controller, :request)
16
+ name = name.sub('Controller', '').downcase
17
+
18
+ # @type [Hash<Symbol>]
19
+ tags = payload.slice(:action, :method, :path)
20
+ tags[:request_id] = request.request_id
21
+ tags[:controller] = name
22
+
23
+ RrxLogging::Current.logger = rails_logger.scoped(name:, tags:)
24
+ request.set_header 'action_dispatch.logger', RrxLogging::Current.logger
25
+ end
26
+
27
+ ActiveSupport::Notifications.subscribe 'process_action.action_controller' do |payload|
28
+ # TODO
29
+ end
@@ -0,0 +1,71 @@
1
+ module RrxLogging
2
+ class Formatter
3
+ MAX_MESSAGE_LENGTH = 2000
4
+
5
+ attr_reader :mode, :default_tags
6
+
7
+ def initialize(mode = :json, tags: nil)
8
+ @mode = mode
9
+ @default_tags = tags || {}
10
+ super()
11
+ end
12
+
13
+ # @param [String] severity
14
+ # @param [Time] timestamp
15
+ # @param [String] progname
16
+ # @param [String] msg
17
+ def call(severity, timestamp, progname, msg)
18
+ msg = msg.to_s.strip
19
+
20
+ if @mode == :json
21
+ data = {
22
+ time: timestamp,
23
+ level: severity,
24
+ log: msg
25
+ }
26
+ data[:name] = progname if progname
27
+ data[:log] = msg.truncate(MAX_MESSAGE_LENGTH) if msg.length > MAX_MESSAGE_LENGTH
28
+ data.merge!(current_tags)
29
+ "#{data.to_json}\n"
30
+ else
31
+ tags = current_tags.map { |k, v| "[#{k}=#{v}]" }
32
+ "%s %s %s %s%s%s\n" % [
33
+ timestamp.strftime('%Y-%m-%d'),
34
+ timestamp.strftime('%H:%M:%S.%L'),
35
+ severity,
36
+ progname ? "#{progname}: " : '',
37
+ msg,
38
+ tags.empty? ? '' : ' %s' % tags.join('')
39
+ ]
40
+ end
41
+ end
42
+
43
+ def with_tags(**tags)
44
+ old_tags = current_tags
45
+ self.current_tags = old_tags.merge(tags)
46
+ yield self
47
+ ensure
48
+ self.current_tags = old_tags
49
+ end
50
+
51
+ def clear_tags!
52
+ current_tags.clear
53
+ end
54
+
55
+ # @return [Hash]
56
+ def current_tags
57
+ Thread.current[thread_key] ||= @default_tags
58
+ end
59
+
60
+ # @param [Hash] val
61
+ def current_tags=(val)
62
+ Thread.current[thread_key] = val
63
+ end
64
+
65
+ # @return [String]
66
+ def thread_key
67
+ # We use our object ID here to avoid conflicting with other instances
68
+ @thread_key ||= "activesupport_tagged_logging_tags:#{object_id}"
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,123 @@
1
+ require 'active_support/logger'
2
+ require 'rails/rack/logger'
3
+ require_relative './formatter'
4
+
5
+ module RrxLogging
6
+ class Logger < ActiveSupport::Logger
7
+ def initialize(mode = :json, name: nil, tags: nil, progname: nil)
8
+ super($stdout, progname: name || progname)
9
+ self.formatter = Formatter.new(mode, tags:)
10
+ @silencers = []
11
+ @filters = []
12
+ end
13
+
14
+ ##
15
+ # This completely overrites the Activesupport::LoggerThreadSafeLevel
16
+ # implementation since the logic we want to change isn't separated
17
+ # out in any convenient way
18
+ def add(severity, message = nil, progname = nil)
19
+ severity ||= UNKNOWN
20
+ progname ||= @progname
21
+
22
+ return true if @logdev.nil? || severity < level
23
+
24
+ if message.nil?
25
+ if block_given?
26
+ message = yield
27
+ else
28
+ message = progname
29
+ progname = @progname
30
+ end
31
+ end
32
+
33
+ return true if noise?(message)
34
+
35
+ write format_message(format_severity(severity), Time.zone.now, progname, message)
36
+ end
37
+
38
+ def scoped(name: nil, tags: nil)
39
+ Logger.new formatter.mode,
40
+ name: name || progname,
41
+ tags: formatter.default_tags.merge(tags || {})
42
+ end
43
+
44
+ # @note Deliberately not named "tagged" as multiple Rails
45
+ # classes assume if the logger has a method with that name
46
+ # then call it with an array of text tags
47
+ def with_tags(**tags)
48
+ formatter.with_tags(**tags) { yield self }
49
+ end
50
+
51
+ # Silence logs of debug level or below
52
+ def silence_debug(&block)
53
+ silence(Logger::INFO, &block)
54
+ end
55
+
56
+ # Silence logs of info level or below
57
+ def silence_info(&block)
58
+ silence(Logger::WARN, &block)
59
+ end
60
+
61
+ # Temporarily ignore log statements below the
62
+ # specified level for the scope of the block
63
+ def silence(level, &block)
64
+ if level > self.level
65
+ log_at(level, &block)
66
+ else
67
+ block.call
68
+ end
69
+ end
70
+
71
+ def noise?(message)
72
+ Rails.configuration.log_noise_filters.any? do |filter|
73
+ case filter
74
+ when Regexp
75
+ filter.match?(message.to_s)
76
+ when String
77
+ message.include? filter
78
+ when Proc
79
+ filter.call(message)
80
+ else
81
+ # Ignore
82
+ false
83
+ end
84
+ end
85
+ end
86
+
87
+ # def add_silencer(&block)
88
+ # @silencers << block
89
+ # end
90
+ #
91
+ # def add_filter(filter)
92
+ # @filters << filter
93
+ # end
94
+ #
95
+ # def silence?(env)
96
+ # @silencers.any? {|s| s.call(env) }
97
+ # end
98
+
99
+ # @param [String] message
100
+ # @param [Exception] exception
101
+ def exception(message, exception)
102
+ backtrace = exception.backtrace
103
+ if backtrace.present?
104
+ cleaned = Rails.backtrace_cleaner.clean(backtrace)
105
+ backtrace = cleaned unless cleaned.empty?
106
+ else
107
+ backtrace = nil
108
+ end
109
+
110
+ error("%s: %s\n%s" % [
111
+ message,
112
+ exception.message,
113
+ backtrace&.join("\n") || 'No backtrace'
114
+ ])
115
+ end
116
+
117
+ private
118
+
119
+ def write(msg)
120
+ @logdev.write msg
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,45 @@
1
+ require_relative './logger'
2
+ require 'action_dispatch/http/request'
3
+
4
+ module RrxLogging
5
+ # Replacement for default Rack logger to add pre-defined
6
+ # named tags instead of the default tag array
7
+ class Middleware
8
+ def initialize(app)
9
+ @app = app
10
+ end
11
+
12
+ def call(env)
13
+ request = ActionDispatch::Request.new(env)
14
+ logger = env.fetch('action_dispatch.logger') { Rails.logger }
15
+ if logger.is_a?(Logger)
16
+ tags = { request_id: request.request_id }
17
+ logger.with_tags(**tags) do
18
+ if noise?(env)
19
+ logger.silence_info { @app.call(env) }
20
+ else
21
+ @app.call(env)
22
+ end
23
+ end
24
+ else
25
+ @app.call(env)
26
+ end
27
+ end
28
+
29
+ def noise?(env)
30
+ Rails.configuration.request_noise_filters.any? do |filter|
31
+ case filter
32
+ when Regexp
33
+ filter.match?(env['PATH_INFO'])
34
+ when String
35
+ env['PATH_INFO'].include? filter
36
+ when Proc
37
+ filter.call(env)
38
+ else
39
+ # Ignore
40
+ false
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,86 @@
1
+ require_relative './logger'
2
+ require_relative './middleware'
3
+ require_relative './current'
4
+ require 'rails/railtie'
5
+ require 'rrx_config'
6
+
7
+ module RrxLogging
8
+ class Railtie < Rails::Railtie
9
+ GEM_FILTERS = %w[active action rack rspec railtie].freeze
10
+
11
+ # List of regular expressions that indicate noisy
12
+ # logs that should be ignored
13
+ config.log_noise_filters = [
14
+ /select 1\s*$/,
15
+ /schema_migrations|sqlite_version|ar_internal_metadata/
16
+ ]
17
+
18
+ # List of matchers for noisy requests. Matched requests will
19
+ # only log warnings and above.
20
+ config.request_noise_filters = [
21
+ 'healthcheck'
22
+ ]
23
+
24
+ initializer(
25
+ 'rrx.logging',
26
+ after: :initialize_logger,
27
+ before: %w[action_controller.set_configs active_record.logger active_job.logger]
28
+ ) do |app|
29
+ init_rails app.config,
30
+ # Verbose when local or deployed to development environment
31
+ RrxConfig.env.development? ? :debug : :info,
32
+ # JSON when deployed, text when local
33
+ mode: Rails.env.production? ? :json : :text
34
+ end
35
+
36
+ protected
37
+
38
+ def init_rails(config, default_level = :info, mode: :json)
39
+ Rails.logger = RrxLogging::Logger.new(mode)
40
+ config.log_level = ENV.fetch('LOG_LEVEL') { default_level }
41
+ config.middleware.insert Rails::Rack::Logger, RrxLogging::Middleware
42
+ config.colorize_logging = !Rails.env.production?
43
+
44
+ init_backtrace_cleaner
45
+ end
46
+
47
+ def init_backtrace_cleaner
48
+ # By default Rails filters exception backtraces to only include source
49
+ # lines from the app itself. Makes it hard to debug when the source is
50
+ # in one of our gems. This replaces the default silencers
51
+ Rails.backtrace_cleaner.remove_filters!
52
+ Rails.backtrace_cleaner.remove_silencers!
53
+
54
+ add_app_filter
55
+ add_gem_filter
56
+ add_ruby_filter
57
+ end
58
+
59
+ # @see rails/backtrace_cleaner.rb
60
+ def add_app_filter
61
+ root = "#{Rails.root}/" # rubocop:disable Rails/FilePath
62
+ Rails.backtrace_cleaner.add_filter do |line|
63
+ line.start_with?(root) ? line.from(root.size) : line
64
+ end
65
+ end
66
+
67
+ # @see active_support/backtrace_cleaner.rb
68
+ def add_gem_filter
69
+ gems_paths = (Gem.path | [Gem.default_dir]).map { |p| Regexp.escape(p) }
70
+ return if gems_paths.empty?
71
+
72
+ gems_regexp = %r{\A(#{gems_paths.join('|')})/(bundler/)?gems/([^/]+)-([\w.]+)/(.*)}
73
+ gems_result = 'gems/\3-\4/\5'
74
+ Rails.backtrace_cleaner.add_filter { |line| line.sub(gems_regexp, gems_result) }
75
+
76
+ gems_filter = %r{\Agems/#{GEM_FILTERS.join('|')}-\w+\s/}
77
+ Rails.backtrace_cleaner.add_silencer { |line| gems_filter.match?(line) }
78
+ end
79
+
80
+ # @see active_support/backtrace_cleaner.rb
81
+ def add_ruby_filter
82
+ Rails.backtrace_cleaner.add_silencer { |line| line.start_with?(RbConfig::CONFIG['rubylibdir']) }
83
+ end
84
+ end
85
+ end
86
+
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RrxLogging
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'rrx_logging/version'
4
+ require_relative 'rrx_logging/railtie'
5
+
6
+ module RrxLogging
7
+ def self.current
8
+ RrxLogging::Current.logger
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ module RRXLogging
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rrx_logging
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dan Drew
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: railties
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rrx_config
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rrx_dev
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description:
84
+ email:
85
+ - dan.drew@hotmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".editorconfig"
91
+ - ".idea/.gitignore"
92
+ - ".idea/inspectionProfiles/Project_Default.xml"
93
+ - ".idea/modules.xml"
94
+ - ".idea/rrx_logging.iml"
95
+ - ".idea/vcs.xml"
96
+ - ".rspec"
97
+ - ".rubocop.yml"
98
+ - CODE_OF_CONDUCT.md
99
+ - Gemfile
100
+ - Gemfile.lock
101
+ - LICENSE.txt
102
+ - README.md
103
+ - Rakefile
104
+ - lib/rrx_logging.rb
105
+ - lib/rrx_logging/current.rb
106
+ - lib/rrx_logging/formatter.rb
107
+ - lib/rrx_logging/logger.rb
108
+ - lib/rrx_logging/middleware.rb
109
+ - lib/rrx_logging/railtie.rb
110
+ - lib/rrx_logging/version.rb
111
+ - sig/rrx_logging.rbs
112
+ homepage: https://github.com/rails-rrx/rrx_logging
113
+ licenses:
114
+ - MIT
115
+ metadata:
116
+ homepage_uri: https://github.com/rails-rrx/rrx_logging
117
+ source_code_uri: https://github.com/rails-rrx/rrx_logging
118
+ post_install_message:
119
+ rdoc_options: []
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '3.1'
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ requirements: []
133
+ rubygems_version: 3.4.10
134
+ signing_key:
135
+ specification_version: 4
136
+ summary: Ruby on Rails API core logging support
137
+ test_files: []