SMUT log is empty when set log level to DEBUG
Bug #1757038 reported by
dyyang@cn.ibm.com
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zVM Cloud Connector |
Fix Committed
|
Low
|
dyyang@cn.ibm.com |
Bug Description
smut.log should contain the calling context when log_level is set to DEBUG, but currently it is empty.
Changed in python-zvm-sdk: | |
status: | New → Confirmed |
importance: | Undecided → Low |
assignee: | nobody → dyyang@cn.ibm.com (dyyang) |
Changed in python-zvm-sdk: | |
milestone: | none → 1.0.1 |
To post a comment you must log in.
ReqHandle.py:
def printSysLog(self, logString):
"""
Log one or more lines. Optionally, add them to logEntries list.
Input:
Strings to be logged.
"""
if zvmsdklog.log_level <= logging.DEBUG:
# print log only when debug is enabled
The zvmsdklog.log_level is always the initial value 20 which is logging.INFO, its value won't be updated automatically when the zvmsdk log is setup. So we should update the if condition to "zvmsdklog. LOGGER. getloglevel( )".