Skip to content

Commit

Permalink
Add json_field config interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail committed Jul 26, 2018
1 parent 1688d3c commit 381a2e4
Show file tree
Hide file tree
Showing 131 changed files with 387 additions and 304 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.

## Unreleased

### Added

- New config interpolator function `json_field` for extracting parts of a JSON
message into a config value.

### Changed

- Log level config field no longer stutters, `logger.log_level` is now
`logger.level`.

## 0.19.1 - 2018-07-25

### Added
Expand Down
2 changes: 1 addition & 1 deletion config/amazon_s3.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/amazon_s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/amazon_sqs.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/amazon_sqs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/amqp.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/amqp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/broker.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/buffers.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/buffers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/dynamic.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/dynamic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/elasticsearch.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ OUTPUT_WEBSOCKET_URL = ws://localhost:4195/post/ws
```
LOGGER_ADD_TIMESTAMP = true
LOGGER_JSON_FORMAT = true
LOGGER_LOG_LEVEL = INFO
LOGGER_LEVEL = INFO
LOGGER_PREFIX = benthos
```

Expand Down
2 changes: 1 addition & 1 deletion config/env/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ output:
logger:
add_timestamp: ${LOGGER_ADD_TIMESTAMP:true}
json_format: ${LOGGER_JSON_FORMAT:true}
log_level: ${LOGGER_LOG_LEVEL:INFO}
level: ${LOGGER_LEVEL:INFO}
prefix: ${LOGGER_PREFIX:benthos}
metrics:
prefix: ${METRICS_PREFIX:benthos}
Expand Down
2 changes: 1 addition & 1 deletion config/everything.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ resources:
xor: []
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/file.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/files.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/http_client.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/http_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/http_server.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/http_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/inproc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/inproc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/kafka.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/kafka_balanced.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/kafka_balanced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/mqtt.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/mqtt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/nats.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/nats_stream.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/nats_stream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/nsq.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/nsq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/processors/archive.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
2 changes: 1 addition & 1 deletion config/processors/archive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resources:
conditions: {}
logger:
prefix: benthos
log_level: INFO
level: INFO
add_timestamp: true
json_format: true
metrics:
Expand Down
2 changes: 1 addition & 1 deletion config/processors/batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"logger": {
"prefix": "benthos",
"log_level": "INFO",
"level": "INFO",
"add_timestamp": true,
"json_format": true
},
Expand Down
Loading

0 comments on commit 381a2e4

Please sign in to comment.