We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba4ba51 commit 9b49c15Copy full SHA for 9b49c15
3 files changed
pyproject.toml
@@ -43,6 +43,11 @@ Documentation = "https://bub.build"
43
[project.scripts]
44
bub = "bub.__main__:app"
45
46
+[project.optional-dependencies]
47
+logfire = [
48
+ "logfire>=4.31.0",
49
+]
50
+
51
[dependency-groups]
52
dev = [
53
"pytest>=7.2.0",
src/bub/__main__.py
@@ -7,7 +7,21 @@
7
from bub.framework import BubFramework
8
9
10
+def _instrument_bub() -> None:
11
+ try:
12
+ import logfire
13
14
+ logfire.configure()
15
+ except ImportError:
16
+ pass
17
+ else:
18
+ from loguru import logger
19
20
+ logger.configure(handlers=[logfire.loguru_handler()])
21
22
23
def create_cli_app() -> typer.Typer:
24
+ _instrument_bub()
25
framework = BubFramework()
26
framework.load_hooks()
27
app = framework.create_cli_app()
0 commit comments