MCPcopy
hub / github.com/dgraph-io/dgraph / Log

Method Log

dgraph/cmd/bulk/loader.go:121–132  ·  view source on GitHub ↗
(filename string, err error, extra string)

Source from the content-addressed store, hash-verified

119}
120
121func (e *errorLogger) Log(filename string, err error, extra string) {
122 if e == nil || e.file == nil {
123 return
124 }
125 e.mu.Lock()
126 defer e.mu.Unlock()
127 // Truncate very long extra info in the log
128 if len(extra) > 500 {
129 extra = extra[:500] + "..."
130 }
131 fmt.Fprintf(e.file, "file: %s\nerror: %v\n%s\n", filename, err, extra)
132}
133
134func (e *errorLogger) Close() error {
135 if e == nil || e.file == nil {

Callers 15

TestQueryLexingFunction · 0.80
TestMutationLexingFunction · 0.80
TestNewSchemaQueryFunction · 0.80
TestAbruptSchemaQueryFunction · 0.80
TestAbruptMutationFunction · 0.80
TestVariables1Function · 0.80
TestVariables2Function · 0.80
TestVariablesDefaultFunction · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 15

TestQueryLexingFunction · 0.64
TestMutationLexingFunction · 0.64
TestNewSchemaQueryFunction · 0.64
TestAbruptSchemaQueryFunction · 0.64
TestAbruptMutationFunction · 0.64
TestVariables1Function · 0.64
TestVariables2Function · 0.64
TestVariablesDefaultFunction · 0.64