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

Forward lc0's stderr to lc0-client's stderr #10

Open
mooskagh opened this issue Jun 12, 2018 · 4 comments
Open

Forward lc0's stderr to lc0-client's stderr #10

mooskagh opened this issue Jun 12, 2018 · 4 comments

Comments

@mooskagh
Copy link
Member

It would be nice to show entire lc0 stderr output when running client, for example by displaying it on lc0-client's stderr. That way when something is wrong with lc0 it can be seen.

@jnewlin12345
Copy link
Contributor

jnewlin12345 commented Jun 12, 2018

It already does this:

go func() {
		stderrScanner := bufio.NewScanner(stderr)
		for stderrScanner.Scan() {
			fmt.Printf("%s\n", stderrScanner.Text())
		}
	}()

@mooskagh
Copy link
Member Author

That's weird because I don't see things like that:

       _
|   _ | |
|_ |_ |_| built Jun  9 2018

in lc0-client's output.

Also maybe instead of doing that manually, there's a way to do that automatically? (in python it's certainly possible to somehow share stderr with subprocess when creating one).

@jnewlin12345
Copy link
Contributor

are you on windows? I see those lines in linux

@Tilps
Copy link
Contributor

Tilps commented Jun 26, 2018

I submitted a PR to hopefully reduce the potential loss of such messages (which are definitely working on windows) by connecting lc0 stderr directly to stdout of client rather than using the goroutine.
If that doesn't work, maybe we should try connecting it to stderr instead.

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

3 participants