The global statement is only required when assigning to a global
variable, not when simply reading its value. In Log::log(), the
global log_level, global log_file and global log_fd declarations
are unnecessary because these variables are only read. Remove both
declarations from Log::log().
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
@staticmethod
def log(msg, msg_level=consts.DEFAULT_LOG_LEVEL):
- global log_level, log_file, log_fd
-
if log_level >= msg_level:
if log_fd is None:
Log.open_logfd(log_file)