legion-settings 1.3.21 → 1.3.22

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: 24640e14063c9f922ecb738b9cb1fc9fea8599dd2e721263aa6bbe940be65f3c
4
- data.tar.gz: cf387ebcb1d7f6d7b52427dcc1283b7bbee9895f35be05cc7dffb63e1db3c367
3
+ metadata.gz: 0e71ebdb5aa34fb51091d1c93fd14f23d090dfea2d8565945b62769c9d829287
4
+ data.tar.gz: 8a1f6bb8e73a46437562c47ffe9a9b396cc498eb68fcf876f9f660a3a98852b6
5
5
  SHA512:
6
- metadata.gz: 2a672dd08c5af2adacc95c7b47c8dc8c279c49c6a212c11a02663eb42c1624b232c509b180af753b06e963fa7998c2e831ee86644d834bcaa0145e2f53794b03
7
- data.tar.gz: 5e7683ce7fd420785dc3d011410de328efeaa5df79ccfed19c2549e9b071dfcb4fa2b57b30245b4c4b5d513c6cc6da4205a67097332a812b998e3e26676a446a
6
+ metadata.gz: 1bea85658e1fe7556accbccc4ce7288d278aa3e18a461d45455ab00e117b4caa2d00736639b755619cb2a1a75ffc3382c2f0d732c4be40da2d3af0a614fc1f72
7
+ data.tar.gz: 16dac89ba37ef95d93318af918e56295488cfec31cb93f79276b66d32b29aa700d07de93992db6ca10342b81790fd2ea436904bb43f59dd4615a0a8b0e9d435b
data/CHANGELOG.md CHANGED
@@ -1,7 +1,19 @@
1
1
  # Legion::Settings Changelog
2
2
 
3
+ ## [1.3.22] - 2026-03-27
4
+
5
+ ### Added
6
+ - Specs for `logging_defaults` covering all structured fields including `trace` and `transport.*` sub-keys
7
+
8
+ ### Changed
9
+ - README updated with version badge (1.3.22) and Logging Defaults section documenting `transport` sub-key
10
+
3
11
  ## [1.3.21] - 2026-03-27
4
12
 
13
+ ### Changed
14
+ - Replace `logging` defaults (`location`, `backtrace_logging`) with structured fields: `format`, `log_file`, `log_stdout`, `async`, `include_pid`, and `transport` sub-key for forwarding flags
15
+ - Extract `logging_defaults` helper method to keep `default_settings` within method length limit
16
+
5
17
  ### Fixed
6
18
  - Prefer RFC-1918 private addresses over CGNAT (100.64.0.0/10) in client IP detection
7
19
 
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Configuration management module for the [LegionIO](https://github.com/LegionIO/LegionIO) framework. Loads settings from JSON files, directories, and environment variables. Provides a unified `Legion::Settings[:key]` accessor used by all other Legion gems.
4
4
 
5
- **Version**: 1.3.19
5
+ **Version**: 1.3.22
6
6
 
7
7
  ## Installation
8
8
 
@@ -79,6 +79,31 @@ Legion::Settings.validate! # raises ValidationError if any settings are invalid
79
79
  # validate! will warn to $stderr (or Legion::Logging) instead of raising
80
80
  ```
81
81
 
82
+ ### Logging Defaults
83
+
84
+ The `logging` key includes a `transport` sub-section (new in 1.3.22) that controls whether log events are forwarded over the message bus:
85
+
86
+ ```json
87
+ {
88
+ "logging": {
89
+ "level": "info",
90
+ "format": "text",
91
+ "log_file": null,
92
+ "log_stdout": true,
93
+ "trace": true,
94
+ "async": true,
95
+ "include_pid": false,
96
+ "transport": {
97
+ "enabled": false,
98
+ "forward_logs": true,
99
+ "forward_exceptions": true
100
+ }
101
+ }
102
+ }
103
+ ```
104
+
105
+ When `transport.enabled` is `true`, log events and unhandled exceptions are published to the AMQP bus so a central log consumer can aggregate them. Disabled by default to avoid a dependency on `legion-transport` at boot.
106
+
82
107
  ## Requirements
83
108
 
84
109
  - Ruby >= 3.4
@@ -58,6 +58,23 @@ module Legion
58
58
  }
59
59
  end
60
60
 
61
+ def logging_defaults
62
+ {
63
+ level: 'info',
64
+ format: 'text',
65
+ log_file: nil,
66
+ log_stdout: true,
67
+ trace: true,
68
+ async: true,
69
+ include_pid: false,
70
+ transport: {
71
+ enabled: false,
72
+ forward_logs: true,
73
+ forward_exceptions: true
74
+ }
75
+ }
76
+ end
77
+
61
78
  def default_settings
62
79
  {
63
80
  client: client_defaults,
@@ -94,12 +111,7 @@ module Legion
94
111
  default_extension_settings: {
95
112
  logger: { level: 'info', trace: false, extended: false }
96
113
  },
97
- logging: {
98
- level: 'info',
99
- location: 'stdout',
100
- trace: true,
101
- backtrace_logging: true
102
- },
114
+ logging: logging_defaults,
103
115
  transport: { connected: false },
104
116
  data: { connected: false },
105
117
  role: { profile: nil, extensions: [] },
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Settings
5
- VERSION = '1.3.21'
5
+ VERSION = '1.3.22'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.21
4
+ version: 1.3.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity