xaal.lib 0.7.10__tar.gz → 0.7.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/PKG-INFO +2 -2
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/pyproject.toml +1 -1
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/aioengine.py +0 -1
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/helpers.py +3 -4
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal.lib.egg-info/PKG-INFO +2 -2
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/README.rst +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/setup.cfg +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/tests/test_bindings.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/tests/test_cbor.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/tests/test_device.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/tests/test_engine.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/tests/test_message.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/tests/test_tools.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/__init__.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/__init__.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/__main__.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/aiohelpers.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/aionetwork.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/bindings.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/cbor.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/config.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/core.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/devices.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/engine.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/exceptions.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/messages.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/network.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/test.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal/lib/tools.py +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal.lib.egg-info/SOURCES.txt +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal.lib.egg-info/dependency_links.txt +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal.lib.egg-info/requires.txt +0 -0
- {xaal_lib-0.7.10 → xaal_lib-0.7.11}/xaal.lib.egg-info/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ import logging
|
|
|
7
7
|
import logging.handlers
|
|
8
8
|
import os
|
|
9
9
|
import time
|
|
10
|
-
from typing import Any, Optional
|
|
10
|
+
from typing import Any, Optional, Union
|
|
11
11
|
|
|
12
12
|
import coloredlogs
|
|
13
13
|
from decorator import decorator
|
|
@@ -40,14 +40,13 @@ def set_console_title(value: str):
|
|
|
40
40
|
# set xterm title
|
|
41
41
|
print("\x1b]0;xAAL => %s\x07" % value, end="\r")
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
def setup_console_logger(level: str = config.log_level):
|
|
43
|
+
def setup_console_logger(level: Union[str, int] = config.log_level):
|
|
45
44
|
fmt = "%(asctime)s %(name)-25s %(funcName)-18s %(levelname)-8s %(message)s"
|
|
46
45
|
# fmt = '[%(name)s] %(funcName)s %(levelname)s: %(message)s'
|
|
47
46
|
coloredlogs.install(level=level, fmt=fmt)
|
|
48
47
|
|
|
49
48
|
|
|
50
|
-
def setup_file_logger(name: str, level: str = config.log_level, filename: Optional[str] = None):
|
|
49
|
+
def setup_file_logger(name: str, level: Union[str, int] = config.log_level, filename: Optional[str] = None):
|
|
51
50
|
filename = filename or os.path.join(config.log_path, "%s.log" % name)
|
|
52
51
|
formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(name)s - %(message)s")
|
|
53
52
|
handler = logging.handlers.RotatingFileHandler(filename, "a", 10000, 1, "utf8")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|