question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to have both stdout and file output in one run?

See original GitHub issue

User story. As a user, I can do run spectral lint with params, so that I can both see the stdout text output and receive report as an html-file.

Is your feature request related to a problem? Well I have a report file that is then published but I’d also like to have visible output in a gitlab job which shows stdout

Describe the solution you’d like Maybe additional parameter --stdout-format that locks stdout output in a chosen format, --output param does its thing as it currently does independently. If --stdout-format is absent then --output suppresses stdout as it does now. NOTE: I kinda need different formats here as we publish html reports, which are well not stdout-friendly, so just removing stdout suppression by output wouldn’t be enough

Additional context I could try to implement this at least in a rough draft if somebody points me to where it’s handled in the src. I couldn’t find by myself. I also might fail miserably since I’m not a js/ts-developer.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
philsturgeoncommented, Jul 27, 2020

When discussing things like this I try to find out what similar tools are doing, and what pros and cons their teams noticed.

Eslint said nope, use the JavaScript api, which… yeah you could do that if running it twice isn’t an option. https://github.com/eslint/eslint/issues/8185

If you can find a similar tool which does allow this, it would be good to see how they’re handling it.

0reactions
philsturgeoncommented, Sep 29, 2020

Sorry, this doesn’t seem like a use case thats common enough for us to try and figure out. If anyone in the future spots this and fancies sending a PR that would be amazing, but there’s loads of other stuff on our plate. Best of luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I get both STDOUT and STDERR to go to the terminal ...
Here's how it works: ... This keeps stderr separate from stdout both in the files and in the command's output. If the first...
Read more >
output both stderr and stdout on console and store them in a ...
I can output both of them on screen just by run the script: $./test OUT! ERR! I can output stderr and catch stdout...
Read more >
Sending Both Output and Error Messages to the Same File
Use the shell syntax to redirect standard error messages to the same place as standard output. Preferred: $ both >& outfile. or: $...
Read more >
Capturing both stdout and stderr together in a log file
This is what we want for longer-running tools like in bioinformatics where the iteration time is much longer, there can easily be multiple...
Read more >
How to manipulate files with shell redirection and pipelines in ...
Then, any command executed through an interactive shell connects to a text terminal on which the shell is running and sends the output...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found