You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by fg...@apache.org on 2018/04/26 21:22:33 UTC

[incubator-sdap-ningesterpy] branch master updated: SDAP-65 ningesterpy output not printing in docker logs (#8)

This is an automated email from the ASF dual-hosted git repository.

fgreg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-ningesterpy.git


The following commit(s) were added to refs/heads/master by this push:
     new bcb6ce1  SDAP-65 ningesterpy output not printing in docker logs (#8)
bcb6ce1 is described below

commit bcb6ce126a6f75f675cdf2d984214d386ae364b0
Author: fgreg <fg...@gmail.com>
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')
 
 
+@app.route('/healthcheck', methods=['GET'], )
+def health_check():
+    return ''
+
+
 def handle_error(e):
     error_id = uuid.uuid4()
 

-- 
To stop receiving notification emails like this one, please contact
fgreg@apache.org.