Skip to content

Commit

Permalink
fix logging bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Aug 26, 2024
1 parent e143539 commit 200c454
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions pioreactor/cli/pio.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,12 @@ def logs(n: int) -> None:
Tail & stream the logs from this unit to the terminal. CTRL-C to exit.
"""
log_file = config.config.get("logging", "log_file", fallback="/var/log/pioreactor.log")
ui_log_file = (
config.config.get("logging", "ui_log_file", fallback="/var/log/pioreactor.log")
if am_I_leader()
else ""
)
if log_file == ui_log_file:
log_files = [log_file]
ui_log_file = config.config.get("logging", "ui_log_file", fallback="/var/log/pioreactor.log")

if am_I_leader():
log_files = list(set([log_file, ui_log_file])) # deduping
else:
log_files = [log_file, ui_log_file]
log_files = [log_file]

with subprocess.Popen(
["tail", "-fqn", str(n)] + log_files, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
Expand Down
2 changes: 1 addition & 1 deletion pioreactor/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Append ".dev0" if a dev version
# Append "rc0" if a rc version
# No zero padding!
__version__ = "24.8.22"
__version__ = "24.8.22.dev0"


def get_hardware_version() -> tuple[int, int] | tuple[int, int, str]:
Expand Down

0 comments on commit 200c454

Please sign in to comment.