legion-logging 1.2.2 → 1.2.3

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: ee94bdf6225742609903f1e3e6c138ee5cbd5997fe1d6558591d250a1f53f2d0
4
- data.tar.gz: 0754c9ff2994dbda182550fb390f9462a6368915bdd2b037d2c8896c825e8199
3
+ metadata.gz: c20f075efac1ef65649607d1b5064be03a2269391379deff8c52eff219ac4e11
4
+ data.tar.gz: 30aad00425b227650adcbba0fb3dd595f469fcbd435d7e2c09eebfe012788808
5
5
  SHA512:
6
- metadata.gz: 3097a20b5e2ef0bdf3c7075bb3102daf6ab66e2a635f96aa62b0792538e6fd0ae627188e432b73acbc58da2032e0fd68d380a6b0d04a0d1d8b5e0fff8854d13d
7
- data.tar.gz: 133b1f37a5fc9ba6ba90944356e0232428815034b99c9c026ee9cdd79769bd053c592d8b57295a67cbc2b5b40e1f3c449c8d15b52e08fc4880296dcd09dc72df
6
+ metadata.gz: bb849ea0ee29d6f1b3316caba8188568cd7dcc410e4eb8110f82d670e75edcfd069a323e298fadfe8f97b90d73db6fc84dd0e6e9abff0a7545e6642754c39cad
7
+ data.tar.gz: da636a6561de29d660997594a58a722d141445b34514ed3cd0ce480bbf255f96e5de5aa2fe0f978c7bd11e157201172752372c318d45c12d4e47204df701937a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Legion::Logging Changelog
2
2
 
3
+ ## v1.2.3
4
+
5
+ ### Changed
6
+ - `Builder#text_format` now accepts `lex_segments:` array and formats it as stacked brackets (e.g. `[agentic][cognitive][anchor]`)
7
+ - Falls back to legacy `lex:` string kwarg for backward compatibility with existing callers
8
+ - `lex: nil` no longer produces a spurious `[]` bracket in log output
9
+
3
10
  ## v1.2.2
4
11
 
5
12
  ### Added
@@ -33,7 +33,11 @@ module Legion
33
33
 
34
34
  def text_format(include_pid: false, **options)
35
35
  log.formatter = proc do |severity, datetime, _progname, msg|
36
- options[:lex_name] = options.key?(:lex) ? "[#{options[:lex]}]" : nil
36
+ options[:lex_name] = if options.key?(:lex_segments)
37
+ options[:lex_segments].map { |s| "[#{s}]" }.join
38
+ elsif options.key?(:lex) && !options[:lex].nil?
39
+ "[#{options[:lex]}]"
40
+ end
37
41
  unless options[:lex_name].nil?
38
42
  loc = caller_locations[4]
39
43
  path = loc.to_s.split('/').last(2)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Logging
5
- VERSION = '1.2.2'
5
+ VERSION = '1.2.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity