master
yaml 35 lines 741 Bytes
Raw
1 ---
2 # Advanced prefix feature test
3 # Tests prefix application to captured groups and injected keys
4
5 pattern: "(?P<level>\\w+)\\s+(?P<code>\\d+)\\s+(?P<message>.*)"
6
7 # All keys should get this prefix
8 prefix: TEST_
9
10 inject:
11 - key: VERSION
12 value: "1.0"
13 - key: HOST
14 value: "localhost"
15
16 rewrite:
17 # Test prefix in variable substitution
18 - key: SUMMARY
19 value: "${TEST_level} ${TEST_code}: ${TEST_message}"
20 inject: yes
21
22 # Test that injected keys also get the prefix
23 - key: FULL_VERSION
24 value: "v${TEST_VERSION}"
25 inject: yes
26
27 rename:
28 # Rename should work with prefixed names
29 - old_key: TEST_level
30 new_key: TEST_SEVERITY
31 - old_key: TEST_code
32 new_key: TEST_ERROR_CODE
33
34 filename:
35 key: TEST_FILENAME