def add_logger(logging_level=logging.INFO, display_level=logging.INFO): """ Performs initial configuration on beluga. """ # Suppress warnings warnings.filterwarnings("ignore") # Initialize logging system helpers.init_logging(logging_level, display_level, config['logfile'])
def add_logger(logging_level=logging.ERROR, display_level=logging.ERROR): """ Attaches a logger to beluga's main process. :keyword logging_level: The level at which logging is written to the output file. :keyword display_level: The level at which logging is displayed to stdout. :return: None """ # Suppress warnings warnings.filterwarnings("ignore") # Initialize logging system helpers.init_logging(logging_level, display_level, config['logfile'])
def setup_beluga(logging_level=logging.INFO, display_level=logging.INFO, output_file=None): """Performs initial configuration on beluga.""" # Get reference to the input file module frm = inspect.stack()[1] input_module = (inspect.getmodule(frm[0])) # Get information about input file info = inspect.getframeinfo(frm[0]) # Suppress warnings warnings.filterwarnings("ignore") # Initialize logging system helpers.init_logging(logging_level,display_level, config['logfile']) # Set the output file name if output_file is not None: config['output_file'] = output_file # solve(problem) return