mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Improve: log important module versions on startup
This commit is contained in:
parent
3983b5c887
commit
119cefce34
3 changed files with 8 additions and 1 deletions
|
@ -26,6 +26,7 @@ from radicale.log import logger
|
|||
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
|
||||
RADICALE_MODULES: Sequence[str] = ("radicale", "vobject", "passlib", "defusedxml")
|
||||
|
||||
def load_plugin(internal_types: Sequence[str], module_name: str,
|
||||
class_name: str, base_class: Type[_T_co],
|
||||
|
@ -50,6 +51,11 @@ def load_plugin(internal_types: Sequence[str], module_name: str,
|
|||
def package_version(name):
|
||||
return metadata.version(name)
|
||||
|
||||
def packages_version():
|
||||
versions = []
|
||||
for pkg in RADICALE_MODULES:
|
||||
versions.append("%s=%s" % (pkg, package_version(pkg)))
|
||||
return " ".join(versions)
|
||||
|
||||
def ssl_context_options_by_protocol(protocol: str, ssl_context_options):
|
||||
logger.debug("SSL protocol string: '%s' and current SSL context options: '0x%x'", protocol, ssl_context_options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue