Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty log for running in background mode #251

Merged
merged 1 commit into from
Jul 14, 2021
Merged

Fix empty log for running in background mode #251

merged 1 commit into from
Jul 14, 2021

Conversation

maxbanton
Copy link
Contributor

No description provided.

@pieterhelsen pieterhelsen changed the base branch from main to dev July 8, 2021 19:12
Copy link
Collaborator

@pieterhelsen pieterhelsen left a comment

Choose a reason for hiding this comment

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

Hi Max,

Thanks for your pull request! This seems to check out :)
Couple of things to take into account should you submit more PRs in the future.
As per the contribution guidelines, make sure to:

  • Create a descriptive bugfix or feature branch (e.g. in this case instead of patch-1 you would use bugfix/documentation-nohup-empty-log or something similar)
  • Point your pull request at the dev branch, instead of the main branch

@martomi
Copy link
Owner

martomi commented Jul 9, 2021

Hi @maxbanton,

this looks good to merge, I think capturing stderr is a good idea in general. What I don't understand is the wording of the commit message. Can you describe what is the actual fix here? All relevant output goes on stdout currently so this is not fixing empty log as the commit message claims. At least not under expected behaviour and on Linux/Mac systems that I am using.

@martomi martomi merged commit 4780abb into martomi:dev Jul 14, 2021
@maxbanton
Copy link
Contributor Author

Hi @martomi. Sorry for late reply and messy commit message, proposed change fixes empty log when running in background mode using instructions from Readme. I mean when I added 2>&1, log entries started to appear in the log file, till that it was empty. Probably it's because I'm running chiadog from cron job on reboot event. As for now my crontab entry looks like this
@reboot . /home/username/chiadog/venv/bin/activate && nohup python3 -u /home/username/chiadog/main.py --config /home/username/chiadog/config.yaml > /home/username/chiadog/output.log 2>&1 & and it starts automatically every time after reboot.

jinnatar pushed a commit to jinnatar/chiadog that referenced this pull request Feb 5, 2023
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.

3 participants