MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / cli

Function cli

beanhub_cli/cli.py:26–40  ·  view source on GitHub ↗
(env: Environment, log_level: str)

Source from the content-addressed store, hash-verified

24@click.version_option(prog_name="beanhub-cli", package_name="beanhub-cli")
25@pass_env
26def cli(env: Environment, log_level: str):
27 env.log_level = LogLevel(log_level)
28 FORMAT = "%(message)s"
29 console = Console(stderr=True)
30 logging.basicConfig(
31 level=LOG_LEVEL_MAP[env.log_level],
32 format=FORMAT,
33 datefmt="[%X]",
34 handlers=[RichHandler(console=console)],
35 force=True,
36 )
37 httpx_logger = logging.getLogger("httpx")
38 httpx_logger.level = logging.WARNING
39 beancount_black_logger = logging.getLogger("beancount_black.formatter")
40 beancount_black_logger.level = logging.WARNING

Callers 1

main.pyFile · 0.90

Calls 1

LogLevelClass · 0.85

Tested by

no test coverage detected