Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CosmoTech_Acceleration_Library/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Cosmo Tech corporation.
# Licensed under the MIT license.

__version__ = '0.8.8'
__version__ = '0.9.0'
41 changes: 1 addition & 40 deletions cosmotech/coal/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,6 @@
# etc., to any person is prohibited unless it has been previously and
# specifically authorized by written means by Cosmo Tech.

import logging
import os

from rich.console import Console
from rich.logging import RichHandler
from rich.highlighter import NullHighlighter

HEADER_LENGTH = 32
CONTENT_LENGTH = 180

HIGLIGHTER = NullHighlighter()
HANDLER = RichHandler(rich_tracebacks=True,
omit_repeated_times=False,
show_path=False,
markup=True,
highlighter=HIGLIGHTER,
console=Console(width=HEADER_LENGTH+CONTENT_LENGTH))
_format = "%(message)s"

if "PAILLETTES" in os.environ:
paillettes = "[bold yellow blink]***[/]"
_format = f"{paillettes} {_format} {paillettes}"

FORMATTER = logging.Formatter(fmt=_format,
datefmt="[%Y/%m/%d-%H:%M:%S]",
)

HANDLER.setFormatter(FORMATTER)


def get_logger(
logger_name: str,
level=logging.INFO
) -> logging.Logger:
_logger = logging.getLogger(logger_name)
if not _logger.hasHandlers():
_logger.addHandler(HANDLER)
_logger.setLevel(level)
return _logger

from cosmotech.orchestrator.utils.logger import get_logger

LOGGER = get_logger("csm.data")
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ boto3~=1.34
requests~=2.32.3

# Orchestrator templates requirements
cosmotech-run-orchestrator~=1.4
cosmotech-run-orchestrator~=1.6.0

# Data store requirements
pyarrow~=17.0.0
Expand Down
Loading