MCPcopy
hub / github.com/TecharoHQ/anubis / Write

Method Write

internal/log.go:54–66  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

52}
53
54func (elf *ErrorLogFilter) Write(p []byte) (n int, err error) {
55 logMessage := string(p)
56 if strings.Contains(logMessage, "context canceled") {
57 return len(p), nil // Suppress the log by doing nothing
58 }
59 if strings.Contains(logMessage, "Unsolicited response received on idle HTTP channel") {
60 return len(p), nil
61 }
62 if elf.Unwrap != nil {
63 return elf.Unwrap.Writer().Write(p)
64 }
65 return len(p), nil
66}
67
68func GetFilteredHTTPLogger() *log.Logger {
69 stdErrLogger := log.New(os.Stderr, "", log.LstdFlags) // essentially what the default logger is.

Callers 6

SHA256sumFunction · 0.45
TestFetchHTMLDocumentFunction · 0.45
TestIntegrationGetOGTagsFunction · 0.45
TestGetOGTagsFunction · 0.45
saveScreenshotFunction · 0.45

Calls 1

ContainsMethod · 0.45

Tested by 5

TestFetchHTMLDocumentFunction · 0.36
TestIntegrationGetOGTagsFunction · 0.36
TestGetOGTagsFunction · 0.36
saveScreenshotFunction · 0.36