Add roc.py
Change-Id: I866b95dd7fe98bbe6f787f113393b2375cf427a5
diff --git a/networkdiag.py b/networkdiag.py
index 315850c..7529eae 100644
--- a/networkdiag.py
+++ b/networkdiag.py
@@ -1,14 +1,31 @@
+"""
+SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+SPDX-License-Identifier: LicenseRef-ONF-Member-1.01
+"""
+import sys
+
from flask import Flask, request
from flask_restful import Resource, Api
+import logging as log
app = Flask(__name__)
api = Api(app)
-class Greeting (Resource):
+
+class Greeting(Resource):
def get(self):
return 'Hello World!'
-api.add_resource(Greeting, '/') # Route_1
+
+api.add_resource(Greeting, '/') # Route_1
if __name__ == '__main__':
- app.run('0.0.0.0','3333')
+ log.basicConfig(
+ format='%(asctime)s %(levelname)-8s %(message)s',
+ level=log.DEBUG,
+ datefmt='%Y-%m-%d %H:%M:%S',
+ stream=sys.stdout)
+
+ log.info("Starting network-diag-app...")
+
+ app.run('0.0.0.0', '3333')