Skip to content

Commit 5533f9c

Browse files
committed
0.9.0 - Move get_logger to csm-orc
1 parent a434ef2 commit 5533f9c

File tree

3 files changed

+3
-42
lines changed

3 files changed

+3
-42
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright (c) Cosmo Tech corporation.
22
# Licensed under the MIT license.
33

4-
__version__ = '0.8.8'
4+
__version__ = '0.9.0'

cosmotech/coal/utils/logger.py

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,6 @@
55
# etc., to any person is prohibited unless it has been previously and
66
# specifically authorized by written means by Cosmo Tech.
77

8-
import logging
9-
import os
10-
11-
from rich.console import Console
12-
from rich.logging import RichHandler
13-
from rich.highlighter import NullHighlighter
14-
15-
HEADER_LENGTH = 32
16-
CONTENT_LENGTH = 180
17-
18-
HIGLIGHTER = NullHighlighter()
19-
HANDLER = RichHandler(rich_tracebacks=True,
20-
omit_repeated_times=False,
21-
show_path=False,
22-
markup=True,
23-
highlighter=HIGLIGHTER,
24-
console=Console(width=HEADER_LENGTH+CONTENT_LENGTH))
25-
_format = "%(message)s"
26-
27-
if "PAILLETTES" in os.environ:
28-
paillettes = "[bold yellow blink]***[/]"
29-
_format = f"{paillettes} {_format} {paillettes}"
30-
31-
FORMATTER = logging.Formatter(fmt=_format,
32-
datefmt="[%Y/%m/%d-%H:%M:%S]",
33-
)
34-
35-
HANDLER.setFormatter(FORMATTER)
36-
37-
38-
def get_logger(
39-
logger_name: str,
40-
level=logging.INFO
41-
) -> logging.Logger:
42-
_logger = logging.getLogger(logger_name)
43-
if not _logger.hasHandlers():
44-
_logger.addHandler(HANDLER)
45-
_logger.setLevel(level)
46-
return _logger
47-
8+
from cosmotech.orchestrator.utils.logger import get_logger
489

4910
LOGGER = get_logger("csm.data")

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ boto3~=1.34
2121
requests~=2.32.3
2222

2323
# Orchestrator templates requirements
24-
cosmotech-run-orchestrator~=1.4
24+
cosmotech-run-orchestrator~=1.6.0
2525

2626
# Data store requirements
2727
pyarrow~=17.0.0

0 commit comments

Comments
 (0)