Documentation ¶
Index ¶
- Constants
- Variables
- type CompressAlgo
- type Entry
- type OvhLogs
- func (o *OvhLogs) Error(v ...interface{}) error
- func (o *OvhLogs) Fatal(v ...interface{})
- func (o *OvhLogs) Fatalf(format string, v ...interface{})
- func (o *OvhLogs) Fatalln(v ...interface{})
- func (o *OvhLogs) Info(v ...interface{}) error
- func (o *OvhLogs) Panic(v ...interface{})
- func (o *OvhLogs) Panicf(format string, v ...interface{})
- func (o *OvhLogs) Panicln(v ...interface{})
- func (o *OvhLogs) Print(v ...interface{}) error
- func (o *OvhLogs) Printf(format string, v ...interface{}) error
- func (o *OvhLogs) Println(v ...interface{}) error
- func (o *OvhLogs) Send(e Entry) (err error)
- type Protocol
Constants ¶
View Source
const ( // CompressNone No compression CompressNone = 1 + iota // CompressGzip GZIP compression for GELF CompressGzip // CompressZlib ZLIB compression for GELF CompressZlib // CompressDeflate DEFLATE for GELF CompressDeflate )
View Source
const ( // UDPChunkMaxSizeFrag max chunk size (fragmented) UDPChunkMaxSizeFrag = 8192 // UDPChunkMaxSize chunk max size UDPChunkMaxSize = 1420 // UDPChunkMaxDataSize chunk data max size UDPChunkMaxDataSize = 1348 // UDP_CHUNK_MAX_SIZE - ( 2 + 8 + 1 + 1) )
Constants usefull for UDP
View Source
const Endpoint = "gra1.logs.ovh.com"
Endpoint is OVH log Endpoint
Variables ¶
View Source
var ( // GelfChunkMagicBytes "magic bytes" for GELF chunk headers GelfChunkMagicBytes = []byte{0x1e, 0x0f} )
Functions ¶
This section is empty.
Types ¶
type CompressAlgo ¶
type CompressAlgo uint8
CompressAlgo is the compression algorithm used
func (CompressAlgo) String ¶
func (c CompressAlgo) String() string
type Entry ¶
type Entry struct { Version string `json:"version"` Host string `json:"host"` ShortMessage string `json:"short_message"` FullMessage string `json:"full_message"` Timestamp float64 `json:"time_stamp"` Level uint8 `json:"level"` Line uint `json:"line"` OvhToken string `json:"_X-OVH-TOKEN"` }
Entry represent a log entry to push to OVH logs PAAS
type OvhLogs ¶
type OvhLogs struct {
// contains filtered or unexported fields
}
OvhLogs represents a OVH logs PAAS wrapper
func New ¶
func New(endpoint, ovhToken string, proto Protocol, compression CompressAlgo, isAsync bool) *OvhLogs
New return a new OvhLogs
func (*OvhLogs) Fatal ¶
func (o *OvhLogs) Fatal(v ...interface{})
Fatal for log.Fatal interface Warning: error are dropped
func (*OvhLogs) Fatalln ¶
func (o *OvhLogs) Fatalln(v ...interface{})
Fatalln for log.Fatalln interface Warning: error are dropped
Click to show internal directories.
Click to hide internal directories.