'Initialize logging
:param console_logging: True if logging to console
:param file_logging: True if logging to file
:param debug_logging: True if debug logging is enabled
:param database_logging: True if logging database access'

def init_logging(self, console_logging=False, file_logging=False, debug_logging=False, database_logging=False):

    self.log_file = (self.log_file or ek(os.path.join, sickbeard.LOG_DIR, u'sickrage.log'))
    global log_file
    log_file = self.log_file
    self.debug_logging = debug_logging
    self.console_logging = console_logging
    self.file_logging = file_logging
    self.database_logging = database_logging
    logging.addLevelName(DB, u'DB')
    logging.getLogger().addHandler(NullHandler())
    for logger in self.loggers:
        if (logger is not self.logger):
            logger.root = self.logger
            logger.parent = self.logger
    log_level = (DB if self.database_logging else (DEBUG if self.debug_logging else INFO))
    for logger in self.loggers:
        logger.setLevel(log_level)
    logging.getLogger(u'tornado.general').setLevel(u'ERROR')
    if self.console_logging:
        console = logging.StreamHandler()
        console.setFormatter(CensoredFormatter(u'%(asctime)s    %(levelname)s::%(message)s', u'%H:%M:%S'))
        console.setLevel(log_level)
        for logger in self.loggers:
            logger.addHandler(console)
    if self.file_logging:
        rfh = logging.handlers.RotatingFileHandler(self.log_file, maxBytes=int((sickbeard.LOG_SIZE * 1048576)), backupCount=sickbeard.LOG_NR, encoding=u'utf-8')
        rfh.setFormatter(CensoredFormatter(u'%(asctime)s    %(levelname)-8s    %(message)s', dateTimeFormat))
        rfh.setLevel(log_level)
        for logger in self.loggers:
            logger.addHandler(rfh)
