-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: avoid update check in custom GUI test
- Loading branch information
1 parent
e601681
commit 86e5374
Showing
7 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
0.16.9 | ||
- tests: avoid update check in custom GUI test | ||
0.16.8 | ||
- ci: maintenance release | ||
0.16.7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import logging | ||
import os | ||
|
||
from ._version import version | ||
|
||
|
||
def setup_logging(module="dcoraid", level=None): | ||
"""Setup global logging | ||
The logging `level` can be any logging level (e.g. `logging.INFO`). | ||
If the logging level is not set, then `INFO` is the default. If the | ||
environment variable `CSKERNEL_DEBUG` is set or if CSKernel is | ||
in-between releases ("post" in the version string), then `DEBUG` | ||
is used. | ||
""" | ||
is_dev = version.count("post") | ||
must_debug = os.environ.get("DCORAID_DEBUG") | ||
if level is None: | ||
level = logging.DEBUG if (is_dev or must_debug) else logging.INFO | ||
|
||
formatter = logging.Formatter( | ||
fmt="%(asctime)s %(levelname)s %(processName)s/%(threadName)s " | ||
"in %(name)s: %(message)s", | ||
datefmt="%H:%M:%S" | ||
) | ||
|
||
logger = logging.getLogger(module) | ||
handler_stream = logging.StreamHandler() | ||
handler_stream.setFormatter(formatter) | ||
logger.addHandler(handler_stream) | ||
logger.setLevel(level) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters