summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/controller.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-11-03 10:43:57 +0700
committerIT Fixcomart <it@fixcomart.co.id>2022-11-03 10:43:57 +0700
commitfe935087fc710cfed618f051c377ed753571d955 (patch)
tree90a2c732eda4a8e2cd29f36e4e7045fc3f0bdff9 /indoteknik_api/controllers/controller.py
parentef84c9cb7e25f1a45c1a8534b6d58feb6a8d7079 (diff)
create logger
Diffstat (limited to 'indoteknik_api/controllers/controller.py')
-rw-r--r--indoteknik_api/controllers/controller.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_api/controllers/controller.py b/indoteknik_api/controllers/controller.py
index 00f4b21a..35aee965 100644
--- a/indoteknik_api/controllers/controller.py
+++ b/indoteknik_api/controllers/controller.py
@@ -6,6 +6,9 @@ import json
from odoo import http
from odoo.http import request
from pytz import timezone
+import logging
+
+_logger = logging.getLogger(__name__)
class Controller(http.Controller):
@@ -19,6 +22,7 @@ class Controller(http.Controller):
return True
except:
remote_address = wsgienv['REMOTE_ADDR']
+ _logger.info("API Request from %s" % remote_address)
allowed_ip_address = ['127.0.0.1', '34.101.189.218', '34.101.55.147']
if remote_address in allowed_ip_address:
return True