-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
32 lines (25 loc) · 813 Bytes
/
.editorconfig
File metadata and controls
32 lines (25 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""destvi_utils."""
import logging
from rich.console import Console
from rich.logging import RichHandler
from ._destvi_utils import
try:
import importlib.metadata as importlib_metadata
except ModuleNotFoundError:
import importlib_metadata
package_name = "destvi_utils"
__version__ = importlib_metadata.version(destvi_utils)
logger = logging.getLogger(__name__)
# set the logging level
logger.setLevel(logging.INFO)
# nice logging outputs
console = Console(force_terminal=True)
if console.is_jupyter is True:
console.is_jupyter = False
ch = RichHandler(show_path=False, console=console, show_time=False)
formatter = logging.Formatter("destvi_utils: %(message)s")
ch.setFormatter(formatter)
logger.addHandler(ch)
# this prevents double outputs
logger.propagate = False
__all__ = ["destvi_utils"]