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

Use a new pipe for receiving the logs from the agent process itself (not the user script) #8

Open
isidentical opened this issue Oct 7, 2022 · 0 comments

Comments

@isidentical
Copy link
Collaborator

def _parse_agent_and_log(self, line: str, level: LogLevel) -> None:
# TODO: we probably should create a new fd and pass it as
# one of the the arguments to the child process. Then everything
# from that fd can be automatically logged as originating from the
# bridge.
# Agent can produce [trace] messages, so change the log
# level to it if this does not originate from the user.
if line.startswith("[trace]"):
line = line.replace("[trace]", "", 1)
level = LogLevel.TRACE
source = LogSource.BRIDGE
else:
source = LogSource.USER
self.log(line, level=level, source=source)

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

No branches or pull requests

1 participant