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

Allow to output to console and file at the same time #1462

Closed
lumaxis opened this issue Mar 9, 2020 · 3 comments
Closed

Allow to output to console and file at the same time #1462

lumaxis opened this issue Mar 9, 2020 · 3 comments

Comments

@lumaxis
Copy link

lumaxis commented Mar 9, 2020

It seems that today, brakeman stops outputting warnings or errors to the console as soon as any output file is specified.

Instead, it would be nice to be able to specify both at the same time, -f text -o report.junit for example, which would output a plain text version to the console and the XML JUnit format to the report.junit file at the same time.

@presidentbeef
Copy link
Owner

Hi @lumaxis - you can do so with -o /dev/stdout.

For example:

brakeman -o /dev/stdout -o report.junit

You probably want color, too:

brakeman --color -o /dev/stdout -o report.junit

@lumaxis
Copy link
Author

lumaxis commented Mar 9, 2020

Oh, sweet! I took a super brief look at the code that handles the output but hadn't realized that just specifying stdout would work, too.
I'll update #1461 to include this as well, would be a great addition to the docs.

@lumaxis
Copy link
Author

lumaxis commented Mar 9, 2020

Ah, bummer. Turns out, our CI server doesn't have /dev/stdout available. I guess I'll stick with cating a plain text file then 🙂

Repository owner locked and limited conversation to collaborators Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants