MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / newErrorLogger

Function newErrorLogger

dgraph/cmd/bulk/loader.go:113–119  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

111}
112
113func newErrorLogger(path string) (*errorLogger, error) {
114 f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
115 if err != nil {
116 return nil, err
117 }
118 return &errorLogger{file: f}, nil
119}
120
121func (e *errorLogger) Log(filename string, err error, extra string) {
122 if e == nil || e.file == nil {

Callers 1

newLoaderFunction · 0.85

Calls 1

OpenFileMethod · 0.65

Tested by

no test coverage detected