Fixed -q command line argument
With logrus' default formatter it boils down to a choice between the colored version OR the human-unreadable list of fields, so the latter is preferable.
This commit is contained in:
parent
ceee0bf2f4
commit
d3466b9609
2 changed files with 5 additions and 1 deletions
|
@ -54,10 +54,10 @@ To Do
|
|||
|
||||
* Proper logging, work in progress:
|
||||
* Sending logs to... well, Graylog... through CLI switches.
|
||||
* Fix file output when quiet mode flag is specified.
|
||||
* Document command line flags.
|
||||
* Add TLS options (skip checks / specify CA) for the Graylog API.
|
||||
* Read object ownership using `grn_permissions` to preserve privileges on users'
|
||||
own objects
|
||||
* Support granting ownership on objects
|
||||
* Use goroutines ? Maybe.
|
||||
* Custom log file/terminal output
|
||||
|
|
4
main.go
4
main.go
|
@ -86,6 +86,10 @@ func configureLogFile(path string) {
|
|||
// Configure the logging library based on the various command line flags.
|
||||
func configureLogging(flags cliFlags) {
|
||||
log = getLoggingContext(flags.instance)
|
||||
log.Logger.SetFormatter(&logrus.TextFormatter{
|
||||
DisableColors: true,
|
||||
FullTimestamp: true,
|
||||
})
|
||||
log.Logger.SetLevel(toLogLevel(flags.logLevel))
|
||||
if flags.logFile != "" {
|
||||
configureLogFile(flags.logFile)
|
||||
|
|
Loading…
Reference in a new issue