Skip to content

Commit

Permalink
Update logger
Browse files Browse the repository at this point in the history
  • Loading branch information
henryruhs committed Dec 7, 2023
1 parent 23bb7f2 commit e448c24
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions chroma_feedback/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@


def init(log_level : LogLevel) -> None:
basicConfig(format = '')
basicConfig(format = None)
get_package_logger().setLevel(get_log_levels()[log_level])


def get_package_logger() -> Logger:
return getLogger('chroma_feedback')


def debug(message : str = '') -> None:
def debug(message : str) -> None:
get_package_logger().debug(message)


def info(message : str = '') -> None:
def info(message : str) -> None:
get_package_logger().info(message)


def warn(message : str = '') -> None:
def warn(message : str) -> None:
get_package_logger().warning(message)


def error(message : str = '') -> None:
def error(message : str) -> None:
get_package_logger().error(message)


Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
'name': 'chroma-feedback',
'description': 'Turn your RGB powered hardware into a status indicator for continuous integration, continuous deployment and infrastructure monitoring',
'version': '13.2.1',
'version': '13.2.2',
'license': 'MIT',
'keywords': ' '.join(producer.ALL),
'author': 'Henry Ruhs',
Expand Down
5 changes: 3 additions & 2 deletions chroma_feedback/reporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any, List
import os

from chroma_feedback import color, helper, logger, metadata, wording
from chroma_feedback.typing import Consumer, ConsumerReport, Producer, ProducerReport, Status
Expand Down Expand Up @@ -86,7 +87,7 @@ def resolve_report_status(producer_report : List[ProducerReport]) -> Status:

def print_header() -> None:
logger.info(metadata.get('name') + ' ' + metadata.get('version') + ' ' + wording.get('by') + ' ' + metadata.get('author'))
logger.info()
logger.info(os.linesep)


def print_report(report : List[Any]) -> None:
Expand All @@ -95,4 +96,4 @@ def print_report(report : List[Any]) -> None:
logger.info(color.format_by_status(value['symbol'], value['status']) + ' ' + value['message'])
else:
logger.info(value['message'])
logger.info()
logger.info(os.linesep)

0 comments on commit e448c24

Please sign in to comment.