1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-23 17:34:17 +03:00

fixed log comments

This commit is contained in:
Adolfo Gómez García 2020-05-15 14:24:26 +02:00
parent 4dec86fe9d
commit cf76d7ae76
2 changed files with 5 additions and 3 deletions

View File

@ -66,7 +66,7 @@ class LocalLogger: # pylint: disable=too-few-public-methods
def log(self, level: int, message: str) -> None:
# Debug messages are logged to a file
# our loglevels are 10000 (other), 20000 (debug), ....
# our loglevels are 0 (other), 10000 (debug), ....
# logging levels are 10 (debug), 20 (info)
# OTHER = logging.NOTSET
if self.logger:

View File

@ -63,15 +63,17 @@ class LocalLogger: # pylint: disable=too-few-public-methods
def log(self, level: int, message: str) -> None:
# Debug messages are logged to a file
# our loglevels are 10000 (other), 20000 (debug), ....
# our loglevels are 0 (other), 10000 (debug), ....
# logging levels are 10 (debug), 20 (info)
# OTHER = logging.NOTSET
if self.logger:
self.logger.log(int(level / 1000), message)
if level <= INFO or self.serviceLogger is False: # Only information and above will be on event log
if level < ERROR or self.serviceLogger is False: # Only information and above will be on event log
return
# In fact, we have restricted level in windows event log to ERROR or FATAL
# but left the code for just a case in the future...
if level < WARN: # Info
servicemanager.LogInfoMsg(message)
elif level < ERROR: # WARN