Strip whitespace for comma-delimited log header config
hilsonp opened this issue · comments
Hello,
Today, I was working on the logging part and was trying to log the headers as explained here: https://docs.imposter.sh/metrics_logs_telemetry/#structured-logging
Only the first header was written until I removed the spaces after the comma in my configuration.
IMPOSTER_LOG_REQUEST_HEADERS and IMPOSTER_LOG_RESPONSE_HEADER is space sensitive
NOK: export IMPOSTER_LOG_REQUEST_HEADERS="X-MockControl, X-CorrelationId"
NOK: export IMPOSTER_LOG_REQUEST_HEADERS="X-MockControl,X-CorrelationId"
I suggest a warning in the log or stripping the spaces when imposter reads the variable.
Best regards,
Pierre