jimmydot | 8b8addd | 2017-05-08 18:00:46 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
kurczews | 72eaec3 | 2018-11-05 12:42:15 +0100 | [diff] [blame] | 3 | BASE_DIR=/etc/onap/vid/conf.d |
| 4 | FINAL_CONFIG_FILE=${BASE_DIR}/logback.xml |
| 5 | TEMPLATE_CONFIG_FILE=${BASE_DIR}/logback_template.xml |
jimmydot | 8b8addd | 2017-05-08 18:00:46 -0400 | [diff] [blame] | 6 | |
| 7 | echo "Localizing the VID logback configuration" |
| 8 | |
| 9 | mkdir -p "${VID_LOG_DIR}" |
| 10 | |
| 11 | sed -e 's/${VID_LOG_LEVEL}/'${VID_LOG_LEVEL}'/g' \ |
| 12 | -e 's,${VID_LOG_DIR},'${VID_LOG_DIR}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { |
| 13 | echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" |
| 14 | exit 3 |
| 15 | } |
| 16 | |
| 17 | echo "Localized ${FINAL_CONFIG_FILE} successfully." |