don't capture logs directly from stdout

previously in run_app_paas.sh, we captured stdout from the app and
piped that into the log file. However, this came up with a bunch of
problems, mainly that exceptions with stack traces often weren't
formatted properly, and kibana could not parse them

instead, with the updated utils library, we can use that to log json
straight to the appropriate directory directly.
This commit is contained in:
Leo Hemsted
2017-08-09 15:30:24 +01:00
parent 5eb2cf859c
commit 56746e6f0f
6 changed files with 7 additions and 31 deletions

View File

@@ -16,7 +16,7 @@ def extract_cloudfoundry_config():
def set_config_env_vars(vcap_services):
vcap_application = json.loads(os.environ.get('VCAP_APPLICATION'))
os.environ['NOTIFY_ENVIRONMENT'] = vcap_application['space_name']
os.environ['LOGGING_STDOUT_JSON'] = '1'
os.environ['NOTIFY_LOG_PATH'] = '/home/vcap/logs/app.log'
for s in vcap_services['user-provided']:
if s['name'] == 'notify-config':