diff --git a/README.md b/README.md index 9bf1f8b..3a05c4a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/main.go b/main.go index 8c9565c..92d4714 100644 --- a/main.go +++ b/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)