Skip to content

feat(executor): centralize log-watching and merge odoo logs#35

Open
hailangvn wants to merge 4 commits into
mainfrom
feat/watch-odoo-log
Open

feat(executor): centralize log-watching and merge odoo logs#35
hailangvn wants to merge 4 commits into
mainfrom
feat/watch-odoo-log

Conversation

@hailangvn

Copy link
Copy Markdown
Collaborator

Moves the repeated journalctl-streaming block from configure, restart, status, and update commands into a single Executor.watch_logs() method that also merges the Odoo logfile (read from config/odoo.conf) when one is configured.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

@hailangvn hailangvn force-pushed the feat/watch-odoo-log branch from f76cbdb to 50889e6 Compare June 5, 2026 03:42
Moves the repeated journalctl-streaming block from configure, restart,
status, and update commands into a single Executor.watch_logs() method
that also merges the Odoo logfile (read from config/odoo.conf) when one
is configured.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Forge ID: F#T67863
@hailangvn hailangvn force-pushed the feat/watch-odoo-log branch from 50889e6 to 6922def Compare June 5, 2026 03:44
@nilshamerlinck

Copy link
Copy Markdown
Contributor

one more thing needed:

  • for the odoo upgrade, please add argument --logfile log/upgrade.log to click-odoo-update
  • and also tail this file so that user could follow the upgrade process and eventual issues

@nilshamerlinck

Copy link
Copy Markdown
Contributor

I'm not sure if you're familiar with lnav and it's colored output?
could you try to have a different color for each file/output? to differentiate odoo output from unit output and tool output

Comment thread trobz_deploy/utils/executor.py Outdated
Comment on lines +120 to +128
try:
home_dir = self.capture("echo $HOME")
conf = f"{home_dir}/{instance_name}/config/odoo.conf"
raw = self.capture(f"grep -E '^logfile' {conf} | cut -d= -f2 | tr -d ' ' || true")
candidate = (raw or "").strip()
if candidate and candidate.lower() not in ("false", "none"):
log_file = candidate
except ExecutorError:
pass

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only if instance of type odoo

hailangvn and others added 2 commits June 9, 2026 16:37
…atch upgrade log

Move DeployType enum from individual command modules into config.py,
add --type option to restart/status commands, and update watch_logs
to only merge Odoo log files when the deploy type is "odoo".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hailangvn hailangvn force-pushed the feat/watch-odoo-log branch from 99954e6 to e1284c8 Compare June 9, 2026 09:42
@hailangvn hailangvn requested a review from nilshamerlinck June 9, 2026 09:48
@hailangvn

Copy link
Copy Markdown
Collaborator Author

Thanks for your comments. The PR has been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants