def _init_log():
 global log
 orig_logger_cls = logging.getLoggerClass()
 logging.setLoggerClass(AstropyLogger)
 try:
  log = logging.getLogger('astropy')
  log._set_defaults()
 finally:
  logging.setLoggerClass(orig_logger_cls)
 return log

def _init_log ( ) : global log orig_logger_cls = logging . getLoggerClass ( ) logging . setLoggerClass ( AstropyLogger ) try : log = logging . getLogger ( 'astropy' ) log . _set_defaults ( ) finally : logging . setLoggerClass ( orig_logger_cls ) return log
initializes the astropy log--in most circumstances this is called automatically when importing astropy .