TUN-528: Move cloudflared into a separate repo

This commit is contained in:
Areg Harutyunyan
2018-07-19 15:02:24 -05:00
parent e8c621a648
commit d06fc520c7
4726 changed files with 1763680 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
package raven
type Writer struct {
Client *Client
Level Severity
Logger string // Logger name reported to Sentry
}
// Write formats the byte slice p into a string, and sends a message to
// Sentry at the severity level indicated by the Writer w.
func (w *Writer) Write(p []byte) (int, error) {
message := string(p)
packet := NewPacket(message, &Message{message, nil})
packet.Level = w.Level
packet.Logger = w.Logger
w.Client.Capture(packet, nil)
return len(p), nil
}