Fix issues with openolt_grpc logging
Change-Id: I5c346d41b7bc1a4b56282627c7f4b5505b1d470d
diff --git a/voltha/adapters/openolt/grpc/logconfig.yml b/voltha/adapters/openolt/grpc/logconfig.yml
index 8ff722b..70ee670 100644
--- a/voltha/adapters/openolt/grpc/logconfig.yml
+++ b/voltha/adapters/openolt/grpc/logconfig.yml
@@ -30,7 +30,7 @@
stream: ext://sys.stdout
localRotatingFile:
class: logging.handlers.RotatingFileHandler
- filename: openolt_grpc.log
+ filename: /var/log/openolt_grpc.log
formatter: default
maxBytes: 2097152
backupCount: 10
diff --git a/voltha/adapters/openolt/grpc/openolt_grpc.py b/voltha/adapters/openolt/grpc/openolt_grpc.py
index 923ab90..1c47e5c 100644
--- a/voltha/adapters/openolt/grpc/openolt_grpc.py
+++ b/voltha/adapters/openolt/grpc/openolt_grpc.py
@@ -69,7 +69,7 @@
kafka_send_pb(topic, ind)
break
else:
- log.info("openolt grpc rx indication", indication=ind)
+ log.debug("openolt grpc rx indication", indication=ind)
kafka_send_pb(topic, ind)
diff --git a/voltha/adapters/openolt/openolt_device.py b/voltha/adapters/openolt/openolt_device.py
index 0c751aa..9bcb6f3 100644
--- a/voltha/adapters/openolt/openolt_device.py
+++ b/voltha/adapters/openolt/openolt_device.py
@@ -168,10 +168,12 @@
# FIXME - better way that avoids absolute paths?
self._grpc = subprocess.Popen(
['python',
- 'voltha/voltha/adapters/openolt/grpc/openolt_grpc.py',
+ 'openolt_grpc.py',
self.broker,
self.host_and_port],
- env={'PYTHONPATH': '/voltha:/voltha/voltha/protos/third_party'})
+ env={'PYTHONPATH': '/voltha:/voltha/voltha/protos/third_party'},
+ cwd='/voltha/voltha/adapters/openolt/grpc',
+ )
def do_state_up(self, event):
self.log.debug("do_state_up")