diff --git a/openlp/core/app.py b/openlp/core/app.py index 492d417c7..ce500c635 100644 --- a/openlp/core/app.py +++ b/openlp/core/app.py @@ -308,15 +308,13 @@ def set_up_logging(log_path): logfile = logging.FileHandler(file_path, 'w', encoding='UTF-8') logfile.setFormatter(logging.Formatter('%(asctime)s %(threadName)s %(name)-55s %(levelname)-8s %(message)s')) log.addHandler(logfile) - if log.isEnabledFor(logging.DEBUG): - print('Logging to: {name}'.format(name=file_path)) + print(f'Logging to: {file_path} and level {log.level}') def main(): """ The main function which parses command line options and then runs """ - log.debug('Entering function - main') args = parse_options() qt_args = ['--disable-web-security'] # qt_args = [] @@ -385,6 +383,7 @@ def main(): Registry.create() settings = Settings() Registry().register('settings', settings) + log.warning(f'Arguments passed {args}') # Need settings object for the threads. settings_thread = Settings() Registry().register('settings_thread', settings_thread) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 7bbfde24d..cd9b37768 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -642,7 +642,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert # We have -disable-web-security added by our code. # If a file is passed in we will have that as well so count of 2 # If not we need to see if we want to use the previous file.so count of 1 - self.log_info(self.application.args) + self.log_warning(self.application.args) if self.application.args and len(self.application.args) > 1: self.open_cmd_line_files(self.application.args) elif self.settings.value('core/auto open'): @@ -1412,8 +1412,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert :param list[str] args: List of remaining positional arguments """ for arg in args: - self.log_info(arg) + self.log_warning(arg) file_name = os.path.expanduser(arg) if os.path.isfile(file_name): - self.log_info("File name found") + self.log_warning("File name found") self.service_manager_contents.load_file(Path(file_name))