Athanasius
b4d7d56222
Startup: Log application and Python version, extra in debug.
...
* appversion and sys.version logged at INFO.
* At DEBUG: platform, argv[0], exec_prefix, executable, sys.path
2020-09-10 10:14:58 +01:00
Athanasius
b162747e6e
Merge pull request #691 from A-UNDERSCORE-D/enhancement/add-flake8-plugins
...
Add more flake8 plugins
2020-09-10 09:34:47 +01:00
A_D
ee12b2073c
fixed some sentence construction
2020-09-09 23:23:15 +02:00
A_D
009ded50a1
Ensured PRs dont fail on doc lints
2020-09-09 23:05:59 +02:00
Athanasius
1446796eb8
UI Scaling: Store pre-fiddling default in theme.default_ui_scale
...
This is in case anything needs to know the ratio between what was the
default and what we then set it to.
2020-09-09 16:18:23 +01:00
A_D
054c2a09c7
Added noqa, docstring, and fstring linters
...
Additionally this removed one linter that was for preferring .format to
modulo formatting, as the new fstring linter does both
2020-09-09 17:13:13 +02:00
A_D
b50ed893ae
Cleaned up and updated Contributing docs
2020-09-09 17:12:44 +02:00
Athanasius
c5518cf763
Pre-release 4.1.0-beta2
Release/4.1.0-beta2
2020-09-09 15:31:42 +01:00
Athanasius
06b8661c91
Merge pull request #690 from EDCD/fix/console-redirect
...
Logging: Move stdout/stderr redirect to before `logging` can be run
2020-09-09 15:29:41 +01:00
Athanasius
f25c743d14
Logging: Move stdout/stderr redirect to before logging
can be run
...
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.
2020-09-09 15:26:08 +01:00
Athanasius
82fc3cad65
Merge pull request #689 from EDCD/fix/eddn-missing-systemaddress
...
Fix/eddn missing systemaddress
2020-09-09 14:46:10 +01:00
Athanasius
99bac688af
eddn: Tweak replay.jsonl try/except flow
...
* Catch OSError instead of Exception (which is *too* general).
* Put the set of self.replaylog in try/else so it only runs when there
are no errors.
2020-09-09 14:36:38 +01:00
Athanasius
5e35012611
eddn: flake8 cleanups
...
* That "EDDN send failed" was too long, so now it's '''-formatted.
* journal_entry() cognitive complexity isn't changing any time soon.
2020-09-09 14:17:39 +01:00
Athanasius
48077f6a30
eddn: Straighten out replay.jsonl opening & minor cleanups.
...
* 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().
2020-09-09 14:03:40 +01:00
Athanasius
5d612822da
eddn: Tweak the extra EDDN failed message logging format.
...
It's more readable with \n between each part, and added a prefix.
2020-09-09 13:51:15 +01:00
Athanasius
f7e516c702
L10/en.template: Add 'Log Level'
2020-09-09 13:43:45 +01:00
Athanasius
e2cf050e63
Merge pull request #687 from EDCD/enhancement/515-ui-scaling
...
Enhancement/515 ui scaling
2020-09-09 13:39:27 +01:00
Athanasius
6484540263
UI Scaling: Add new strings to translation template
2020-09-09 13:35:05 +01:00
Athanasius
94607bf55f
UI Scaling: Use a tk.Scale instead, allowing for finer grained setting.
...
* NB: Windows Registry has no type for 'Float', so we use a string.
* We now store '0.0' to mean 'default'.
2020-09-09 13:31:36 +01:00
Athanasius
62d5e3c1c9
Merge pull request #680 from EDCD/feature/more-companion-logging
...
companion.py: Add more logging to better trace auth/CAPI flow
2020-09-08 18:53:30 +01:00
Athanasius
5c3b8b9927
compnanion.py: Add more logging to better trace auth/CAPI flow
2020-09-08 18:52:03 +01:00
Athanasius
e693af1283
EDDN: Log the message we tried to send if it fails.
2020-09-08 18:51:17 +01:00
Athanasius
957d11c84b
prefs.py: Minor comment format change
2020-09-08 13:16:07 +01:00
Athanasius
1850354b8d
UI Scaling: Implement a 'default' option
...
* 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.
2020-09-08 12:27:57 +01:00
Athanasius
ea53a60596
UI Scaling: Option added to Appearance tab of Settings
2020-09-08 12:18:48 +01:00
Athanasius
09add21a1a
Logging: DEBUG always to rotated files, configured level to stdout/err
...
* 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`.
2020-09-08 10:03:16 +01:00
Athanasius
45b8d5f164
Logging: Always have the rotated logfiles at DEBUG level
2020-09-08 09:15:43 +01:00
Athanasius
717253e7fa
setup.py: Add 'dataclasses' and 'timeout_session'
...
These are needed for latest inara.py plugin code.
Release/4.1.0-beta1
2020-09-07 18:02:06 +01:00
Athanasius
58139a4348
Pre-release 4.1.0-beta1
...
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.
2020-09-07 17:38:55 +01:00
Athanasius
cd0d0f9e08
PLUGINS.md: Update for logging now being available
2020-09-07 17:38:15 +01:00
Athanasius
05971ab4c3
Merge pull request #685 from EDCD/enhancement/logging-rotating-archive
...
Enhancement/logging rotating archive
2020-09-07 16:56:25 +01:00
Athanasius
55fe4f37b8
EDMC: Blank line on scope change
2020-09-07 16:54:08 +01:00
Athanasius
f85371ac99
EDMCLogging: flake8 cleanup
...
* import order.
* Sanitise RotatingFileHandler() call formatting.
2020-09-07 15:09:11 +01:00
Athanasius
30c9dbefc1
EDMC.py: General flake8 cleanup.
...
* Fix f-strings that are just plain strings.
* Sort imports.
* noqa E501 lines I want that long.
* And misc other minor cleanups.
2020-09-07 15:06:15 +01:00
Athanasius
dde1eb911e
EDMCLogging: Misc cleanups
2020-09-07 14:50:12 +01:00
Athanasius
d940357854
EDMarketConnector.py: Blank line at the end.
2020-09-07 14:44:09 +01:00
Athanasius
117c65c4db
Logging: Use cleaner pathlib.mkdir()
2020-09-07 14:42:51 +01:00
Athanasius
10c3fec4f8
Logging: Set configured loglevel on creation
2020-09-07 14:40:55 +01:00
Athanasius
c3fbd1164e
Logging: Implement additional logging to rotated set of files.
...
* 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.
2020-09-07 14:17:49 +01:00
Athanasius
faeb579be6
EDMC: Corrections to logging
...
* 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.
2020-09-07 14:10:27 +01:00
Athanasius
5c9c9e2056
Logging: Default loglevel now INFO
...
We have EDMC CL arg and GUI selection of loglevel now, stored in
settings, so default can be INFO.
2020-09-07 13:14:20 +01:00
Athanasius
ceca268bdc
Merge pull request #684 from EDCD/feature/logging-select-loglevel
...
Feature/logging select loglevel
2020-09-06 19:29:10 +01:00
Athanasius
815b4695a6
Use logger.exception() to take care of showing the exception.
2020-09-06 19:19:23 +01:00
Athanasius
50c7220455
EDMC: Adding logging, including CL arg to set level
2020-09-06 19:07:37 +01:00
Athanasius
bebe162071
logging: Now setting loglevel from Settings, and loading at start
2020-09-06 18:29:26 +01:00
Athanasius
fa7b6b4daf
logging: 'loglevel' preference now saved.
2020-09-06 18:22:10 +01:00
Athanasius
0deeeb5799
logging: Added Settings>Configuration 'Loglevel' option.
...
Not yet functional, but dropdown is there and properly populated.
2020-09-06 18:19:55 +01:00
Athanasius
0142337afe
Merge branch 'main' of https://github.com/EDCD/EDMarketConnector into main
2020-09-06 10:25:11 +01:00
Athanasius
3438867ad3
Docs: Reference Bug Report Template if applicable, not general issue URL.
2020-09-06 10:24:30 +01:00
Athanasius
7dc1f97a32
Update issue templates
...
Re-arranged "Bug report" template, and included instructions on attaching the log file.
2020-09-04 21:51:21 +01:00