Using a Tk.DoubleVar() with a locale where a comma is used as the
decimals separator leads to internal tk code recording values with the
comma but then other tk code not accepting that back, so it always
thinks the value is zero and the scale slider can't be moved.
Ref: https://stackoverflow.com/questions/45289237/tkinter-scale-slider-with-float-values-doesnt-work-with-locale-of-language-that
* Change to storing as a REG_DWORD under 'ui_scale' not 'ui_scaling'.
* Change all the code, except the call to *set* the tk scaling to use an
integer, with 100 = 100%, i.e. equivalent to the old 1.0.
* Update strings slightly, so translations will need updating too.
NB: The theme.default_ui_scale value for plugin authors to query is
still the float that tk returns.
If anything does `import logging` it's likely to grab a copy of
sys.stderr before we redirect it meaning things aren't properly
redirected when we start logging.
So put the redirect as early as possible in EDMarketConnector.py.
This will need a test implemented to be sure it's not accidentally
broken by addition of an import before this.
* The logic for opening replay.jsonl, and detecting if the file was
already there or not was tortured. No longer.
* Changed a few logger.debug(..., exc_info=) to logger.exception().
* Changed all logger.warn() (deprecated) to logger.warning().
* If no ui_scaling yet set, set it to 'default'.
* 'default' added to dropdown choices.
Note that you still need an application restart for this to take effect.
* EDMCLogging.Logger.get_streamhandler() method to get the
logger_channel so prefs.py can call setLevel() on it.
* The top-level Logger level is always DEBUG.
* The RotatingFileHandler level is always DEBUG.
* The StreamHandler level is as configured by the user.
* EDMCLogging now creates a singleton of EDMCLogging.Logger and its
associated Logger.
* plug.py tweaked to only import EDMCLogging where it's needed for
getting/creating plugin loggers, else `import logging`.
This *should* be functionally equivalent to 4.0.6, but with the addition
of proper logging. There's a chance some of the per-file code cleanups
might have inadvertently introduced bugs.
* All logging duplicated into %TEMP%/{appname}/{logger_name}.log
* These are handled by the RotatingFileHandler, currently set to 1MiB
per file and 10 backup files.
* Do *NOT* setLevel() on the handlers, as we want to control the level
up at the logger instead. This would have caused the CL and GUI
selection of loglevel to NOT have any effect (hidden by default having
been DEBUG).
* EDMarketConnector.py now INFO logs its startup and exit.
* Use appcmdname as the logger name so it looks different from the GUI
version. This also causes a different log filename in the rotated log
set.
* Log at DEBUG for Startup and Exiting. Which means replacing all of
the `sys.exit(EXIT_SUCCESS)` with `return` so we can log the Exit
after `main()` returns and then `sys.exit(EXIT_SUCCESS)` there.