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

Suppress the InfluxDB banner if the log output is not a TTY #9445

Merged
merged 1 commit into from
Feb 14, 2018

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented Feb 14, 2018

This PR removes the InfluxDB logo when output is redirected to a non-TTY device in order to strip extraneous data from log files.

@ghost ghost assigned stuartcarnie Feb 14, 2018
@ghost ghost added the review label Feb 14, 2018
@stuartcarnie stuartcarnie changed the title don't print the logo if STDOUT is not a TTY. Suppress the InfluxDB banner if STDOUT is not a TTY. Feb 14, 2018
cmd/parse.go Outdated
@@ -27,3 +32,13 @@ func ParseCommandName(args []string) (string, []string) {
}
return "", args
}

// IsTerminal checks if w is a file and whether it is an interactive terminal session.
func IsTerminal(w io.Writer) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to just expose this method from the logger package rather than to copy it here.

@jsternberg jsternberg changed the title Suppress the InfluxDB banner if STDOUT is not a TTY. Suppress the InfluxDB banner if STDOUT is not a TTY Feb 14, 2018
@jsternberg jsternberg changed the title Suppress the InfluxDB banner if STDOUT is not a TTY Suppress the InfluxDB banner if the log output is not a TTY Feb 14, 2018
@stuartcarnie stuartcarnie merged commit 88d6543 into master Feb 14, 2018
@stuartcarnie stuartcarnie deleted the sgc-nologo branch February 14, 2018 22:52
@ghost ghost removed the review label Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants