09-16-2019 10:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2019 10:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
Is it possible to pipe all console.logs that print from app/companion to a text file?
I'm using CLI with Visual Studio Code to build and run my app:
fitbit$ build-and-install
Now, at this point, I'd like to specify that all output from now on should be sent to a log file, eg:
fitbit$ build-and-install > log.txt
This obviously doesn't work, but hopefully you get my point. Also, when an app or companion code prints to console, it should be as well piped to the log file.
Answered! Go to the Best Answer.

Accepted Solutions
09-20-2019 07:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-20-2019 07:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
In case someone wondered, I did it on windows with:
echo build-and-install | npx fitbit > log.txt
in the terminal window.
09-20-2019 07:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-20-2019 07:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
In case someone wondered, I did it on windows with:
echo build-and-install | npx fitbit > log.txt
in the terminal window.
