Report Issue Edit Page

Log Format

Dgraph’s log format comes from the glog library and is formatted as follows:

`Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg...`

Where the fields are defined as follows:

	L                A single character, representing the log level (eg 'I' for INFO)
	mm               The month (zero padded; ie May is '05')
	dd               The day (zero padded)
	hh:mm:ss.uuuuuu  Time in hours, minutes and fractional seconds
	threadid         The space-padded thread ID as returned by GetTID()
	file             The file name
	line             The line number
	msg              The user-supplied message

Query Logging

To enable query logging, you must set -v=3 which will enable verbose logging for everything. Alternatively, you can set --vmodule=server=3 for only the dgraph/server.go file which would only enable query/mutation logging.