legion-settings 1.3.21 → 1.3.23

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: af6d9548572c80f4e8177c865c398105c4288e89aa9414c35c23f0d4c662449c
4
+ data.tar.gz: ba550a83d49ae9a8c8ae4169b140b28de62b999c88cf3432cb3001aebf1abb9f
5
5
  SHA512:
6
- metadata.gz: 2a672dd08c5af2adacc95c7b47c8dc8c279c49c6a212c11a02663eb42c1624b232c509b180af753b06e963fa7998c2e831ee86644d834bcaa0145e2f53794b03
7
- data.tar.gz: 5e7683ce7fd420785dc3d011410de328efeaa5df79ccfed19c2549e9b071dfcb4fa2b57b30245b4c4b5d513c6cc6da4205a67097332a812b998e3e26676a446a
6
+ metadata.gz: 66596b88e9b96d24311fcd645fb230ad81af8ec848c9a57217c2a34a2c2704e176a834d962d49467f54fdbdb79a748bcfa5f6e7e5cf61b4c96fb0e1c25502393
7
+ data.tar.gz: 47933e4f3016e4009914a4764ce69a4381a04db508ed2146bf2d3cbf724f561df4523078deeda4a12e31eb9ac1bbd9b5fde0d9e71a08b5c73ea69ea3fc8e5998
data/CHANGELOG.md CHANGED
@@ -1,7 +1,24 @@
1
1
  # Legion::Settings Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ### Added
6
+ - Absorber settings defaults (enabled, max_depth, sources: meetings/email/github/files)
7
+
8
+ ## [1.3.22] - 2026-03-27
9
+
10
+ ### Added
11
+ - Specs for `logging_defaults` covering all structured fields including `trace` and `transport.*` sub-keys
12
+
13
+ ### Changed
14
+ - README updated with version badge (1.3.22) and Logging Defaults section documenting `transport` sub-key
15
+
3
16
  ## [1.3.21] - 2026-03-27
4
17
 
18
+ ### Changed
19
+ - Replace `logging` defaults (`location`, `backtrace_logging`) with structured fields: `format`, `log_file`, `log_stdout`, `async`, `include_pid`, and `transport` sub-key for forwarding flags
20
+ - Extract `logging_defaults` helper method to keep `default_settings` within method length limit
21
+
5
22
  ### Fixed
6
23
  - Prefer RFC-1918 private addresses over CGNAT (100.64.0.0/10) in client IP detection
7
24
 
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,53 @@ 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
+
78
+ def absorbers_defaults
79
+ {
80
+ enabled: true,
81
+ max_depth: 5,
82
+ sources: {
83
+ meetings: {
84
+ enabled: true,
85
+ include_chat: true,
86
+ include_files: true,
87
+ retention_days: 90,
88
+ min_duration_min: 5
89
+ },
90
+ email_inbox: {
91
+ enabled: false,
92
+ folder: 'inbox',
93
+ max_age_days: 30
94
+ },
95
+ github: {
96
+ enabled: false,
97
+ events: %w[pull_request issues]
98
+ },
99
+ files: {
100
+ enabled: false,
101
+ watch_dirs: [],
102
+ extensions: %w[pdf docx txt md]
103
+ }
104
+ }
105
+ }
106
+ end
107
+
61
108
  def default_settings
62
109
  {
63
110
  client: client_defaults,
@@ -94,19 +141,15 @@ module Legion
94
141
  default_extension_settings: {
95
142
  logger: { level: 'info', trace: false, extended: false }
96
143
  },
97
- logging: {
98
- level: 'info',
99
- location: 'stdout',
100
- trace: true,
101
- backtrace_logging: true
102
- },
144
+ logging: logging_defaults,
103
145
  transport: { connected: false },
104
146
  data: { connected: false },
105
147
  role: { profile: nil, extensions: [] },
106
148
  region: { current: nil, primary: nil, failover: nil, peers: [],
107
149
  default_affinity: 'prefer_local', data_residency: {} },
108
150
  process: { role: 'full' },
109
- dns: dns_defaults
151
+ dns: dns_defaults,
152
+ absorbers: absorbers_defaults
110
153
  }
111
154
  end
112
155
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Settings
5
- VERSION = '1.3.21'
5
+ VERSION = '1.3.23'
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.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity