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

On Node, send console.foo() logging to a file, or discard it #62

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

AtkinsSJ
Copy link
Contributor

@AtkinsSJ AtkinsSJ commented Mar 14, 2024

On Node, having this console output appear inline makes it difficult to check that normal output is correct, and also looks confusing for non-developers. Instead, intercept calls to console.foo(), and either write the logs to a file as indicated by --log=FILE, or discard them. Logging can still be followed easily by running tail -f FILE in a separate terminal.

For now, all kinds of logs are sent to the same file. If necessary in future, we could direct different types to different files.

image

This will be used for redirecting console.log() and friends to a file,
when running in Node.
On Node, having this console output appear inline makes it difficult to
check that normal output is correct, and also looks confusing for
non-developers. Instead, intercept calls to `console.foo()`, and either
write the logs to a file as indicated by `--log=FILE`, or discard them.
Logging can still be followed easily by running `tail -f FILE` in a
separate terminal.

For now, all kinds of logs are sent to the same file. If necessary in
future, we could direct different types to different files.
@KernelDeimos
Copy link
Collaborator

This brings #26 closer to imminent priority I think

@KernelDeimos KernelDeimos merged commit 258226a into HeyPuter:trunk Mar 14, 2024
3 checks passed
@AtkinsSJ AtkinsSJ deleted the log-to-file branch March 14, 2024 17:33
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.

2 participants