[IMP] iot: add logs of IoT Box image/version

Before the current PR, the version of Odoo along with the git branch of
the IoT Box and the associated image were never logged. Adding this
information to logs allow to to debug / inspect issues more easily

task-3716879

closes odoo/odoo#152558

X-original-commit: 8bf1c8984948b003544427eb81f66514ed783bd0
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit is contained in:
Yaroslav Soroko (yaso)
2024-02-03 06:59:51 +00:00
parent bc800ae093
commit 7f22dcfb28
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -89,6 +89,7 @@ class Manager(Thread):
"""
helpers.start_nginx_server()
_logger.info("IoT Box Image version: %s", helpers.get_version())
if platform.system() == 'Linux' and helpers.get_odoo_server_url():
helpers.check_git_branch()
helpers.generate_password()
+1
View File
@@ -147,6 +147,7 @@ def check_git_branch():
db_branch = 'master'
local_branch = subprocess.check_output(git + ['symbolic-ref', '-q', '--short', 'HEAD']).decode('utf-8').rstrip()
_logger.info("Current IoT Box local git branch: %s / Associated Odoo database's git branch: %s", local_branch, db_branch)
if db_branch != local_branch:
with writable():