This is an automated email from the ASF dual-hosted git repository. fgreg pushed a commit to branch v1.0.0-rc1 in repository https://gitbox.apache.org/repos/asf/incubator-sdap-ningesterpy.git
commit bcb6ce126a6f75f675cdf2d984214d386ae364b0 Author: fgreg <[email protected]> AuthorDate: Thu Apr 26 14:22:31 2018 -0700 SDAP-65 ningesterpy output not printing in docker logs (#8) * Ensure that logging is using the `sys.stdout` stream. * Added `/healthcheck` endpoint to test for when the server is available --- sdap/ningesterpy.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sdap/ningesterpy.py b/sdap/ningesterpy.py index ff143ed..e036952 100644 --- a/sdap/ningesterpy.py +++ b/sdap/ningesterpy.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import logging +import sys import uuid from flask import Flask, request, jsonify, Response @@ -25,8 +26,9 @@ from werkzeug.exceptions import HTTPException, BadRequest from werkzeug.exceptions import default_exceptions from sdap.processors.processorchain import ProcessorChain, ProcessorNotFound, MissingProcessorArguments + logging.basicConfig(format="%(asctime)s %(levelname)s %(process)d --- [%(name)s.%(funcName)s:%(lineno)d] %(message)s", - datefmt="%Y-%m-%d %H:%M:%S") + datefmt="%Y-%m-%d %H:%M:%S", stream=sys.stdout) applog = logging.getLogger(__name__) applog.setLevel(logging.INFO) @@ -81,6 +83,11 @@ def run_processor_chain(): return Response(result, mimetype='application/octet-stream') [email protected]('/healthcheck', methods=['GET'], ) +def health_check(): + return '' + + def handle_error(e): error_id = uuid.uuid4()
