Spaces:
Sleeping
Sleeping
h3110Fr13nd
commited on
Update src/kidney_classification/__init__.py
Browse files
src/kidney_classification/__init__.py
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
import os
|
2 |
import sys
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
|
18 |
-
|
|
|
1 |
import os
|
2 |
import sys
|
3 |
+
import logging
|
4 |
|
5 |
+
logging_str = "[%(asctime)s: %(levelname)s: %(module)s %(message)s]"
|
6 |
|
7 |
+
__name__ = "kidney_classification"
|
8 |
+
log_dir = "logs"
|
9 |
+
log_filepath = os.path.join(log_dir, "running_logs.log")
|
10 |
+
os.makedirs(log_dir, exist_ok=True)
|
11 |
|
12 |
+
logging.basicConfig(
|
13 |
+
level=logging.INFO,
|
14 |
+
format=logging_str,
|
15 |
+
handlers=[logging.FileHandler(log_filepath), logging.StreamHandler(sys.stdout)],
|
16 |
+
)
|
17 |
|
18 |
+
logger = logging.getLogger(__name__)
|