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

Log to stderr to match expected output shown in the "Hello, XLS!" tutorial #1745

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gdurfee0
Copy link

When following the "Hello, XLS!" tutorial, I didn't see the expected output from running the hello_xls.x test. It looks like we need --logtostderr (or --alsologtostderr) for the output to match what is shown in the tutorial.

Copy link

google-cla bot commented Nov 28, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gdurfee0
Copy link
Author

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Signed.

```

You should see the following output:

```
[ RUN UNITTEST ] hello_test
trace of hello_string @ hello.x:4:17-4:31: [72, 101, 108, 108, 111, 44, 32, 88, 76, 83, 33]
... trace of hello_string: [72, 101, 108, 108, 111, 44, 32, 88, 76, 83, 33]
Copy link
Member

Choose a reason for hiding this comment

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

is the ... intentional?

Copy link
Author

Choose a reason for hiding this comment

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

Yes - I omitted the timestamp, thread ID, filename, and line number for brevity. The complete output looks something like this:

I1128 12:37:01.486118 1057 hello_xls.x:2] trace of hello_string: [72, 101, 108, 108, 111, 44, 32, 88, 76, 83, 33]

I suppose we could spell it all out in general terms:

IMMDD HH:MM:SS.MICROS THRDID hello_xls.x:2] trace of hello_string: [72, 101, 108, 108, 111, 44, 32, 88, 76, 83, 33]

Do you have a preference?

@@ -107,14 +107,14 @@ up! Open a terminal and execute the following in the XLS checkout root
directory:

```
$ ./bazel-bin/xls/dslx/interpreter_main hello_xls.x
$ ./bazel-bin/xls/dslx/interpreter_main --logtostderr hello_xls.x
Copy link
Member

Choose a reason for hiding this comment

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

what about --alsologtostderr ?

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@mikex-oss mikex-oss requested a review from proppy December 13, 2024 17:21
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.

2 participants