SMUT log is empty when set log level to DEBUG

Bug #1757038 reported by dyyang@cn.ibm.com
6
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.

Revision history for this message
dyyang@cn.ibm.com (dyyang) wrote :

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()".

Revision history for this message
dyyang@cn.ibm.com (dyyang) wrote :

This also influences the zvmsdk debug log. (debug info won't be printed when log_level is set to DEBUG)

Revision history for this message
dyyang@cn.ibm.com (dyyang) wrote :

Correct to comment #2: zvmsdk log not affected, sdkserver would.

Huang Rui (bjhuangr)
Changed in python-zvm-sdk:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → dyyang@cn.ibm.com (dyyang)
Huang Rui (bjhuangr)
Changed in python-zvm-sdk:
milestone: none → 1.0.1
Revision history for this message
Huang Rui (bjhuangr) wrote :
Changed in python-zvm-sdk:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.