def __init__()

in app/source/dragen/src/scheduler/logger.py [0:0]


    def __init__(self, cfg=None, logpath=None, syslogger=False, procname=None, stdout=False):
        if cfg:
            self.log_level = cfg.verbose
        else:
            self.log_level = 1
        self.stdout = stdout
        self.syslogger = syslogger

        if procname:
            self.procname = procname
        else:
            self.procname = "dragen_jobd"

        if self.syslogger:
            self.logopt = syslog.LOG_CONS | syslog.LOG_PID | syslog.LOG_NDELAY
            self.facility = syslog.LOG_USER
            self.logfd = None
        elif logpath:
            try:
                self.logfd = open(logpath, 'w', 0)
                self.logpath = logpath
            except Exception as e:
                print("ERROR: could not open %s for logging - log output redirected to stdout" % logpath)
                self.logfd = sys.stdout
        else:
            print("Log output is being redirected to stdout")
            self.logfd = sys.stdout
            self.stdout = True