Enable monitor logging in dev mode

This commit is contained in:
Mathieu Comandon 2019-01-16 15:14:12 -08:00
parent 9031fffcc9
commit f98fdefcf4
2 changed files with 3 additions and 5 deletions

View file

@ -3,14 +3,12 @@ import os
import sys
import subprocess
import signal
# import logging
import logging
import ctypes
from ctypes.util import find_library
from lutris.util.monitor import ProcessMonitor
# from lutris.util.log import logger
from lutris.util.log import logger
# Set logging level if you want to use logging
# logger.setLevel(logging.DEBUG)
PR_SET_CHILD_SUBREAPER = 36
@ -102,6 +100,7 @@ def main():
if __name__ == "__main__":
LAUNCH_PATH = os.path.dirname(os.path.realpath(__file__))
if not LAUNCH_PATH.startswith("/usr"):
logger.setLevel(logging.DEBUG)
sys.dont_write_bytecode = True
SOURCE_PATH = os.path.normpath(os.path.join(LAUNCH_PATH, '..'))
sys.path.insert(0, SOURCE_PATH)

View file

@ -52,7 +52,6 @@ class ProcessMonitor:
exclude_processes (str or list): list of processes that shouldn't be monitored
include_processes (str or list): list of process that should be forced to be monitored
"""
# process names from /proc only contain 15 characters
self.include_processes = [
x[0:15] for x in self.parse_process_list(include_processes)