Skip to content

Commit f43782c

Browse files
authored
feat: include API version in "Driver is up" startup message (#24)
1 parent c1acb2d commit f43782c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ucapi/api.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
from ucapi import media_player
2929
from ucapi.entities import Entities
3030

31+
try:
32+
from ._version import version as __version__
33+
except ImportError:
34+
__version__ = "unknown"
35+
3136
_LOG = logging.getLogger(__name__)
3237
_LOG.setLevel(logging.DEBUG)
3338

@@ -125,9 +130,10 @@ async def init(
125130
)
126131

127132
_LOG.info(
128-
"Driver is up: %s, version: %s, listening on: %s:%d",
133+
"Driver is up: %s, version: %s, api: %s, listening on: %s:%d",
129134
self._driver_info["driver_id"],
130135
self._driver_info["version"],
136+
__version__,
131137
host,
132138
port,
133139
)

0 commit comments

Comments
 (0)