def _init_logger(self):
        # make sure we have the required settings for our logging
        if ('logfile' in self.gen_opts) and \
           ('loglevel' in self.gen_opts):

            setup_logfile_logger(
                self.gen_opts['logfile'],
                self.gen_opts['loglevel'],
            )

            # Only log to foreground if not running as a daemon
            if not self.gen_opts['daemonize']:
                setup_console_logger(
                    log_level=self.gen_opts['loglevel'],
                )
        else:
            # if no log settings found, use defaults

            # Only log to foreground if not running as a daemon
            if not self.gen_opts['daemonize']:
                setup_console_logger(
                    log_level="warn"
                )

            setup_logfile_logger(
                '/var/log/salt/eventsd',
                'warn',
            )
sets up the logger used throughout saltt-eventsd
dataset/ETHPy150Open felskrone/salt-eventsd/salteventsd/loader.py/SaltEventsdLoader._init_logger