Commit Graph
93 Commits
Author SHA1 Message Date
David Sangrey 17ad4ff61a First Pass - Refactor Older Functions 2026-06-08 18:32:46 -04:00
David Sangrey ef8ba7b11f Hand Over OS to Pathlib where possible 2026-06-06 14:24:44 -04:00
David Sangrey 60fb4a10dc Add Back Compatibility Shims for 6.2.0 2026-06-04 23:00:36 -04:00
David Sangrey c8ebf9704c Hand Over Logger to Loguru 2026-06-03 22:41:29 -04:00
David Sangrey cebf32264e [#1633] Add Refresh Trace_If Handlers 2026-01-06 21:18:02 -05:00
David Sangrey e8d55a5835 [Minor] Improve Pre-Config Logger 2025-12-12 20:58:55 -05:00
David Sangrey 2041b3d3d3 [Minor] Update Type Hints and Alias Usages 2025-12-01 22:04:28 -05:00
David Sangrey 567d42e4b3 [517] Hand Over Config to New Format 2025-11-16 19:08:19 -05:00
David Sangrey ed964b3e55 Merge pull request #2408 from HullSeals/enhancement/2406/common-core-refactor
[#2406] Duplicate Code Refactor
2025-04-22 19:10:18 -04:00
David Sangrey 5c14a7afc7 [Minor] Slight Refactorings 2025-04-13 13:44:51 -04:00
David Sangrey 4c334835f2 [Minor] Simplify if-else statements 2025-04-11 19:57:18 -04:00
David Sangrey 6139d66b8e Merge branch 'develop' into enhancement/2114/pathlib-handover 2024-07-21 23:40:35 -04:00
David Sangrey fcd7b8da0f [2215] Clarify Config Imports 2024-06-17 18:20:53 -04:00
David Sangrey f8b7a8b919 [2114] Cleanup Initial Commit
Some of these are already paths.
2024-06-10 17:49:13 -04:00
David Sangrey fe8818d187 [2114] Apply PathLib Handover 2024-06-10 17:21:06 -04:00
David Sangrey 74af852fca [2215] Move Logging Directory 2024-06-10 09:43:00 -04:00
David Sangrey 13e74f2c57 [2255] Replace Infi Systray with simplesystray 2024-06-09 15:28:27 -04:00
Bruno Marques 192ba5f8f2 Adding pkg_resources exception to DeprecationWarning 2024-06-09 20:07:13 +01:00
Bruno Marques b0e682f66c Enabled DeprecationWarning by default and fixed references 2024-06-09 18:40:03 +01:00
David Sangrey 95c73179c6 [2051] Logging File Check 2023-11-17 18:39:47 -05:00
Athanasius f4b150960c prefs.py & related files: Fix up mypy type checking
* Some trivial.
* As myNotebook.py's class is based on `ttk.Notebook`, typing changed to
  that.
2022-12-23 14:47:21 +00:00
Athanasius acbe1231ef EDMCLogging: loglevel is str | int 2022-12-23 14:47:03 +00:00
Athanasius 333b84ada6 EDMCLogging: Fix minor MAGIC comment format issue 2022-01-20 14:59:46 +00:00
Athanasius 251f129774 EDMCLogging: Reword/format the 'UTC please' MAGIC comments 2022-01-20 14:58:06 +00:00
A_D 71261fc3d9 Reorder and clarify some comments 2022-01-20 16:49:38 +02:00
A_D 3b4f6a4e85 switch comments to MAGIC tags 2022-01-20 16:41:18 +02:00
A_D 5f007b3f77 more clarifying logs 2022-01-20 16:32:36 +02:00
A_D 66a212f7c4 move UTC to hardcoded, add comment 2022-01-20 16:26:04 +02:00
A_D 85f7bddef0 use gmtime as time formatter 2022-01-20 15:52:44 +02:00
Athanasius 82ab72a655 EDMCLogging: Fix import order 2021-08-13 15:22:35 +01:00
A_D 504e7c7eb5 use glob matching for trace-on matching 2021-08-13 15:50:36 +02:00
A_D 41895d591a added trace-if and TRACE_ALL loglevels 2021-08-12 16:45:18 +02:00
Athanasius 4db6542269 EDMCLogging: No fn.__qualname__ ? Just use name. 2021-05-10 15:22:56 +01:00
A_D 71f2246cf4 Missed an import 2021-05-10 15:34:02 +02:00
A_D 5fea307fd7 Fixed quotes 2021-05-10 15:30:47 +02:00
A_D 92e580e0c7 Fixed error when logging out of a class var
This also adds an insane amount of paranoia around getting SOMETHING
dumped when an exception happens.

Fixes #1044
2021-05-10 15:28:26 +02:00
Athanasius bc33bf1b19 Attempt to get develop back to code state before rebase on main. 2021-04-01 14:45:51 +01:00
Athanasius a6866fb4d1 EDMCLogging: Return 'best efforts' if erroring in caller_attributes() 2021-04-01 14:45:50 +01:00
Athanasius d589ca6ed2 Expand caller_attributes() docstring to params and return 2021-04-01 14:45:50 +01:00
A_D 051245cf90 Renamed various config values to be backwards compatible 2021-04-01 14:45:48 +01:00
Athanasius 92d9185b43 EDMCLogging: Revert to Python 3.8+ walrus operator
* Re-order an import to make isort happy
* Mark caller_attributes() as ignoring C901 as well

# Conflicts:
#	EDMCLogging.py
2021-04-01 14:45:47 +01:00
A_D 374d96e767 Fixed unquoted LoggerMixin cast 2021-04-01 14:45:46 +01:00
Athanasius 25852997c5 Updated all source to use new config methods
# Conflicts:
#	monitor.py
2021-04-01 14:45:46 +01:00
Athanasius 4c9cf9ed65 Logging: Add osthreadid, and add process, thread and osthreadid to format
* It looks like in Python 3.8 the %(thread)d is the native OS thread ID
  anyway, but let's keep osthreadid anyway.
2021-04-01 14:45:44 +01:00
A_D ddb53a6ca1 Added type checker magic to make TRACE work
Relatively simple. Because all of our loggers are created out of
EDMCLogging, we can create a fake type in EDMCLogging that inherits
from logging.Logger but also defines a trace method.

Once that is done, we just have to annotate our methods to get loggers
with the new type, cast all of the returns, and suddenly we no longer
have any complaints about logger.trace. This doesn't _actually_ change
any behaviour at runtime, and logging.Logger.trace and logging.TRACE
will continue to be broken, but those are used far less than
logger.trace is used throughout the codebase, and therefore I think we
can live with `# type: ignore` comments everywhere
2021-04-01 14:45:44 +01:00
Ash Holland 590cd608d3 Fix logging from mangled methods where class name starts with "_"
Python's name-mangling rules are quite complex. Previously, EDMC was
incorrectly mangling names where the class name starts with one or more
underscores; if the class name starts with any underscores, they should
be removed before prepending to the identifier being mangled. If the
class name contains *only* underscores, no mangling should be performed.
2021-01-08 15:32:42 +00:00
Athanasius 91e6583326 Merge pull request #812 from A-UNDERSCORE-D/fix/808-log-in-property-func
Added support for logging from properties
2021-01-05 14:27:59 +00:00
A_D 1cb876c594 Added support for logging from properties
This is some best effort support for using logging in properties.

This works by using the (as suggested by reporter) inspect
`getattr_static` method, and failing that (as it can possibly fail),
wrapping a `getattr` in a try/catch for a RecursionError--don't want to
catch other things, probably best if that explodes on its own.

From there as the `property` object will not have location information,
we rebuild as best we can to an approximation of what the path would be.
With a healthy dash of defensive programming "Just in case".

I don't think that this will have any adverse effects to other logging
methods, as all the new code should only be touched if we hit a property
object.

Closes #808
2020-12-21 12:39:45 +02:00
Athanasius 286647869b EDMCLogging: Comment out a 'testing' raise() call 2020-12-15 19:35:51 +00:00
Athanasius f885c2b769 EDMCLogging: Catch inspect.getframeinfo(frame) not working
Maybe with this we'll see something 'here' or later to give a clue as to
why this doesn't work on at least two systems.
2020-12-15 15:08:36 +00:00