func NewFileBackend()

in galog_file.go [45:58]


func NewFileBackend(logFilePath string) *FileBackend {
	res := &FileBackend{
		backendID:   "log-backend,file",
		logFilePath: logFilePath,
		config:      newBackendConfig(defaultFileQueueSize),
	}

	res.config.SetFormat(ErrorLevel,
		`{{.When.Format "2006-01-02T15:04:05.0000Z07:00"}} {{if .Prefix}} {{.Prefix}}: {{end}}[{{.Level}}]: {{.Message}}`)
	res.config.SetFormat(DebugLevel,
		`{{.When.Format "2006-01-02T15:04:05.0000Z07:00"}} {{if .Prefix}} {{.Prefix}}: {{end}}[{{.Level}}]: ({{.File}}:{{.Line}}) {{.Message}}`)

	return res
}