aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-05-14 23:08:20 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-05-14 23:08:20 +0200
commit702d7900b646a9d873e6eaa4c61088c618eba9f1 (patch)
tree144689c62b77622cefee5b47d6bb0d91095082f0 /src/ee/tools
parent2cdf0c4b9865f025e52938fb9b772cc79319db09 (diff)
downloadee-python-702d7900b646a9d873e6eaa4c61088c618eba9f1.tar.gz
ee-python-702d7900b646a9d873e6eaa4c61088c618eba9f1.tar.bz2
ee-python-702d7900b646a9d873e6eaa4c61088c618eba9f1.tar.xz
ee-python-702d7900b646a9d873e6eaa4c61088c618eba9f1.zip
ee.logging: New module to handle logging. Need something better for
messages too. create-bom: Resolving parts from their value fact too.
Diffstat (limited to 'src/ee/tools')
-rw-r--r--src/ee/tools/__init__.py24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/ee/tools/__init__.py b/src/ee/tools/__init__.py
index b0c1051..46004e9 100644
--- a/src/ee/tools/__init__.py
+++ b/src/ee/tools/__init__.py
@@ -2,7 +2,12 @@ import os.path
from pathlib import Path
from typing import Union
-from colors import color
+from ee.logging import log
+
+__all__ = [
+ "mk_parents",
+ "log" # for compatibility, should be removed
+]
def _mkdir_and_open(path):
@@ -23,20 +28,3 @@ def mk_parents(path: Union[str, Path]):
if not os.path.isdir(dirname):
os.mkdir(dirname)
-
-
-class Log(object):
- def __init__(self):
- pass
-
- def warn(self, msg):
- print(color(msg, "orange"))
-
- def info(self, msg):
- print(color(msg, "white"))
-
- def debug(self, msg):
- print(color(msg, "grey"))
-
-
-log = Log()