Removes logrus package and refactors logging messages (#5293)

This fix removes logrus package dependency and refactors the console
logging as the only logging mechanism by removing file logging support.
It rearranges the log message format and adds stack trace information
whenever trace information is not available in the error structure.
It also adds `--json` flag support for server logging.
When minio server is started with `--json` flag, all log messages are
displayed in json format, with no start-up and informational log
messages.
Fixes #5265 #5220 #5197
This commit is contained in:
ebozduman
2018-01-17 09:24:46 -06:00
committed by kannappanr
parent 85580fe0d6
commit 24d9d7e5fa
15 changed files with 207 additions and 313 deletions

View File

@@ -38,6 +38,10 @@ var globalFlags = []cli.Flag{
Name: "quiet",
Usage: "Disable startup information.",
},
cli.BoolFlag{
Name: "json",
Usage: "Output server logs and startup information in json format.",
},
}
// Help template for minio.