Skip to content

Commit

Permalink
static log level test
Browse files Browse the repository at this point in the history
  • Loading branch information
devmaxde committed Dec 11, 2024
1 parent 26c8182 commit 2d7bf23
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
metricq_package_dir = "metricq"
protobuf_version_module_file = "_protobuf_version.py"

INFO = 2
ERROR = 4


class ProtocWrapper:
@staticmethod
Expand Down Expand Up @@ -224,10 +227,10 @@ def finalize_options(self) -> None:
self.proto_dir = "lib/metricq-protobuf/"

def info(self, msg: str) -> None:
self.announce(f"info: {type(self).__name__}: {msg}", level=logging.INFO)
self.announce(f"info: {type(self).__name__}: {msg}", level=INFO)

def error(self, msg: str) -> None:
self.announce(f"error: {type(self).__name__}: {msg}", level=logging.ERROR)
self.announce(f"error: {type(self).__name__}: {msg}", level=ERROR)

@property
def _protobuf_filenames(self) -> Iterable[str]:
Expand Down

0 comments on commit 2d7bf23

Please sign in to comment.