minio/docs/logging.md
Harshavardhana 9472299308 logging: Log only for unhandled errors, remove all the debug logging. (#1652)
This patch brings in the removal of debug logging altogether, instead
we bring in the functionality of being able to trace the errors properly
pointing back to the origination of the problem.

To enable tracing you need to enable "MINIO_TRACE" set to "1" or "true"
environment variable which would print back traces whenever there is an
error which is unhandled or at the handler layer.

By default this tracing is turned off and only user level logging is
provided.
2016-05-16 14:31:28 -07:00

487 B

Logging.

  • fatalIf - wrapper function which takes error and prints jsonic error messages.
  • errorIf - similar to fatalIf but doesn't exit on err != nil.

Supported logging targets.

  • console
  • file
  • syslog

Sample logger section from ~/.minio/config.json

		"console": {
			"enable": true,
			"level": "error"
		},
		"file": {
			"enable": false,
			"fileName": "",
			"level": "error"
		},
		"syslog": {
			"enable": false,
			"address": "",
			"level": "error"
		}