Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
Transport
}
Service represents a Logging service instance.
func MustNewService ¶
MustNewService does the same thing as NewService, but panics on error.
func NewService ¶
NewService uses the factory function passed into it to construct a logging transport, which is then used as the underlying transport for the Service instance returned.
Any panics in the factory function are turned into errors, so it is safe to panic when the transport creation process fails to save some if errs.
type Transport ¶
type Transport interface { services.Transport Tracef(format string, params ...interface{}) Debugf(format string, params ...interface{}) Infof(format string, params ...interface{}) Warnf(format string, params ...interface{}) error Errorf(format string, params ...interface{}) error Criticalf(format string, params ...interface{}) error Trace(v ...interface{}) Debug(v ...interface{}) Info(v ...interface{}) Warn(v ...interface{}) error Error(v ...interface{}) error Critical(v ...interface{}) error // Flush is there just in case the transport decides to implement some kind // of buffering. Flush should force the transport to send the logs immediately. Flush() }
Transport interface for logging defines a set of common methods any other logger would implement. The task of structs implementing this interface is to stream the inserted log records to the Meeko broker, where they are processed centrally.