Skip to content

Commit 767bf58

Browse files
authored
Merge pull request #5 from internap/add-api-logging
Add logging in the api so we know that api api has beed called
2 parents 599e7b2 + 4b9c8d6 commit 767bf58

File tree

1 file changed

+5
-1
lines changed
  • ubersmith_remote_module_server

1 file changed

+5
-1
lines changed

ubersmith_remote_module_server/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import functools
1516
import json
17+
import logging
18+
1619
from flask import request, current_app
17-
import functools
1820

1921

2022
class Api(object):
@@ -33,10 +35,12 @@ def __init__(self, modules, app, router):
3335
app.add_url_rule('/{}'.format(module_name), view_func=handle_endpoint, methods=['POST'])
3436

3537
def list_implemented_methods(self, module):
38+
logging.debug("List implemented methods for {module}".format(module=module))
3639
methods = self.router.list_implemented_methods(module)
3740
return json_response({'implemented_methods': methods}, 200)
3841

3942
def handle_remote_invocation(self, module):
43+
logging.debug("Handle remote invocation for {module}".format(module=module))
4044
data = request.get_json()
4145
output = self.router.invoke_method(module=module, **data)
4246
return json_response(output, 200)

0 commit comments

Comments
 (0)