Error in CloudFoundry logging config

1
I'm trying to set the LOGGING_CONFIG environment variable, exactly as this link describes: cf set-env <myApp> LOGGING_CONFIG "{"ConnectionBus": "TRACE"}"  but getting the following error upon restart: 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR ERROR: Starting app container failed: Traceback (most recent call last): 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "start.py", line 998, in <module> 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR complete_start_procedure_safe_to_use_for_restart(m2ee) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "start.py", line 973, in complete_start_procedure_safe_to_use_for_restart 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR configure_logging(m2ee) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "start.py", line 907, in configure_logging 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR json.loads(v) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "/usr/lib/python2.7/json/__init__.py", line 338, in loads 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR return _default_decoder.decode(s) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "/usr/lib/python2.7/json/decoder.py", line 366, in decode 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR obj, end = self.scan_once(s, idx) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR ValueError: Expecting property name: line 1 column 2 (char 1) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR Traceback (most recent call last): 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "start.py", line 998, in <module> 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR complete_start_procedure_safe_to_use_for_restart(m2ee) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "start.py", line 973, in complete_start_procedure_safe_to_use_for_restart 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR configure_logging(m2ee) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "start.py", line 907, in configure_logging 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR json.loads(v) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "/usr/lib/python2.7/json/__init__.py", line 338, in loads 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR return _default_decoder.decode(s) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "/usr/lib/python2.7/json/decoder.py", line 366, in decode 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR obj, end = self.scan_once(s, idx) 2018-12-12T17:34:16.04+0000 [APP/PROC/WEB/0] ERR ValueError: Expecting property name: line 1 column 2 (char 1) Before I submit a ticket, anybody has seen this before? EDIT I have also tried input that will make the value exactly as the documentation specifies, but still get the same error: cf set-env <myApp> LOGGING_CONFIG "'{\"ConnectionBus\":\"TRACE\"}'"  
asked
1 answers
1

The ValueError indicates that it cannot parse the json value.

Did you try to using a single quote (') around the json value instead of double quotes?

cf set-env <myApp> LOGGING_CONFIG '{"ConnectionBus": "TRACE"}'

 

answered