Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Surface WAGI logs through .NET logger #116

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Surface WAGI logs through .NET logger #116

merged 1 commit into from
Jul 5, 2021

Conversation

itowlson
Copy link
Contributor

@itowlson itowlson commented Jul 5, 2021

Fixes #72

ForwardLogs(process.StandardOutput, $"{c.Application.Name}:{c.Name}:wagi:stdout", LogLevel.Trace),
ForwardLogs(process.StandardError, $"{c.Application.Name}:{c.Name}:wagi:stderr")
);
_wagiProcessIds[c.Id] = (process.Id, log);
Copy link
Member

Choose a reason for hiding this comment

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

Wonder if its worth logging the process exit code here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can log it in the Exited handler though I'm not sure how meaningful it will be - I think Rust always returns exit code 1 if an error escapes from main, and the only other reason would be forced termination. Can't hurt though - I've raised an issue for it.

@itowlson itowlson merged commit 944b16d into deislabs:main Jul 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WagiLocalJobScheduler should capture stdout/err from wagi and relog it using ILogger.LogXXX
2 participants