Revert "Adding TRACE level to VOLTHA logs"
This reverts commit 3d7abcced71b0f67d11ca028907803494a0b0a1e.
Change-Id: I9efb08383389c5150cc070de902e6bb1c9736e30
diff --git a/common/structlog_setup.py b/common/structlog_setup.py
index 828c439..cbbda89 100644
--- a/common/structlog_setup.py
+++ b/common/structlog_setup.py
@@ -79,14 +79,6 @@
logging.config.dictConfig(log_config)
logging.root.level -= 10 * verbosity_adjust
- # Add TRACE log level (lower than DEBUG:10)
- TRACE_LOGLVL = 5
- logging.addLevelName(TRACE_LOGLVL, "TRACE")
- def trace_loglevel(self, message, *args, **kws):
- if self.isEnabledFor(TRACE_LOGLVL):
- self._log(TRACE_LOGLVL, message, args, **kws)
- logging.Logger.trace = trace_loglevel
-
processors = [
add_exc_info_flag_for_exception,
structlog.processors.StackInfoRenderer(),
@@ -104,6 +96,7 @@
log.info("first-line")
return log
+
def update_logging(instance_id, vcore_id):
"""
Add the vcore id to the structured logger
diff --git a/voltha/core/global_handler.py b/voltha/core/global_handler.py
index f6e728a..098e145 100644
--- a/voltha/core/global_handler.py
+++ b/voltha/core/global_handler.py
@@ -159,12 +159,12 @@
@twisted_async
@inlineCallbacks
def ListLogicalDevices(self, request, context):
- log.trace('grpc-request', request=request)
+ log.debug('grpc-request', request=request)
response = yield self.dispatcher.dispatch('ListLogicalDevices',
Empty(),
context,
broadcast=True)
- log.trace('grpc-response', response=response)
+ log.debug('grpc-response', response=response)
returnValue(response)
@twisted_async
@@ -190,13 +190,13 @@
@twisted_async
@inlineCallbacks
def ListLogicalDevicePorts(self, request, context):
- log.trace('grpc-request', request=request)
+ log.debug('grpc-request', request=request)
response = yield self.dispatcher.dispatch('ListLogicalDevicePorts',
request,
context,
id=request.id)
- log.trace('grpc-response', response=response)
+ log.debug('grpc-response', response=response)
if isinstance(response, DispatchError):
log.warn('grpc-error-response', error=response.error_code)
context.set_details(
@@ -204,7 +204,7 @@
context.set_code(response.error_code)
returnValue(Ports())
else:
- log.trace('grpc-success-response', response=response)
+ log.debug('grpc-success-response', response=response)
returnValue(response)
@twisted_async
@@ -476,19 +476,19 @@
@twisted_async
@inlineCallbacks
def ListDevicePorts(self, request, context):
- log.trace('grpc-request', request=request)
+ log.debug('grpc-request', request=request)
response = yield self.dispatcher.dispatch('ListDevicePorts',
request,
context,
id=request.id)
- log.trace('grpc-response', response=response)
+ log.debug('grpc-response', response=response)
if isinstance(response, DispatchError):
log.warn('grpc-error-response', error=response.error_code)
context.set_details('Device \'{}\' error'.format(request.id))
context.set_code(response.error_code)
returnValue(Ports())
else:
- log.trace('grpc-success-response', response=response)
+ log.debug('grpc-success-response', response=response)
returnValue(response)
@twisted_async
diff --git a/voltha/core/local_handler.py b/voltha/core/local_handler.py
index 4fc7ab8..2a2df05 100644
--- a/voltha/core/local_handler.py
+++ b/voltha/core/local_handler.py
@@ -135,7 +135,7 @@
@twisted_async
def ListLogicalDevices(self, request, context):
- log.trace('grpc-request', request=request)
+ log.debug('grpc-request', request=request)
items = self.root.get('/logical_devices')
return LogicalDevices(items=items)
@@ -161,7 +161,7 @@
@twisted_async
def ListLogicalDevicePorts(self, request, context):
- log.trace('grpc-request', request=request)
+ log.debug('grpc-request', request=request)
if '/' in request.id:
context.set_details(
@@ -725,7 +725,7 @@
@twisted_async
def ListDevicePorts(self, request, context):
- log.trace('grpc-request', request=request)
+ log.debug('grpc-request', request=request)
if '/' in request.id:
context.set_details(