tests-always-included / wick

Bash-only IT automation, machine provisioning
Other
69 stars 12 forks source link

Fixing logging issues - multiple lines and lack of data #86

Closed fidian closed 8 years ago

fidian commented 8 years ago

Multiple line issue, before:

DEBUG: curl
DEBUG: -option
DEBUG: -another=option
DEBUG: http://example.com

Multiple lines after:

DEBUG: curl -option -another=option http://example.com

This stemmed from using ${array[*]} inside of a string. When used that way, the array is joined by the first character of IFS. With strict mode, IFS is set to "\n\t", so the messages were joined up by newlines.

Lack of data before:

INFO: Adding virtual host stuff  config

Lack of data after:

INFO: Adding virtual host stuff arrayElement1 arrayElement2 config

The variable was being inserted incorrectly.

fidian commented 8 years ago

Would love @kyle-long to review. This is why I asked you to message me yesterday while we were diagnosing that issue.