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
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs_src/tutorials/hello_xls.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```

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?

[ OK ]
[===============] 1 test(s) ran; 0 failed; 0 skipped.
```
Expand Down
Loading