Documentation ¶
Overview ¶
Package logs provides the abstract logging infrastructure for pantahub logging endpoint as well as backends for elastic and mgo.
Logs offers a simple logging service for Pantahub powered devices and apps. To post new log entries use the POST method on the main endpoint To page through log entries and sort etc. check the GET method
Package logs provides the abstract logging infrastructure for pantahub logging endpoint as well as backends for elastic and mgo.
Logs offers a simple logging service for Pantahub powered devices and apps. To post new log entries use the POST method on the main endpoint To page through log entries and sort etc. check the GET method
Package logs provides the abstract logging infrastructure for pantahub logging endpoint as well as backends for elastic and mgo.
Logs offers a simple logging service for Pantahub powered devices and apps. To post new log entries use the POST method on the main endpoint To page through log entries and sort etc. check the GET method
Package logs provides the abstract logging infrastructure for pantahub logging endpoint as well as backends for elastic and mgo.
Logs offers a simple logging service for Pantahub powered devices and apps. To post new log entries use the POST method on the main endpoint To page through log entries and sort etc. check the GET method
Package logs provides the abstract logging infrastructure for pantahub logging endpoint as well as backends for elastic and mgo.
Logs offers a simple logging service for Pantahub powered devices and apps. To post new log entries use the POST method on the main endpoint To page through log entries and sort etc. check the GET method
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCursorNotImplemented error = errors.New("cursor not supported by backend")
ErrCursorNotImplemented cursor not implemented
var ErrCursorTimedOut error = errors.New("cursor Invalid or expired")
ErrCursorTimedOut invalid cursor error
Functions ¶
This section is empty.
Types ¶
type App ¶
App logs rest application
type Backend ¶
type Backend interface {
// contains filtered or unexported methods
}
Backend logs interface
func NewElasticLogger ¶
NewElasticLogger uses environment settings to to initialize the elastic logger.
You need to call register() afterwards.
type CursorClaim ¶
type CursorClaim struct { NextCursor string `json:"next-cursor"` jwtgo.StandardClaims }
CursorClaim claim log cursor
type Entry ¶
type Entry struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Device string `json:"dev,omitempty" bson:"dev"` Owner string `json:"own,omitempty" bson:"own"` TimeCreated time.Time `json:"time-created,omitempty" bson:"time-created"` LogTSec int64 `json:"tsec,omitempty" bson:"tsec"` LogTNano int64 `json:"tnano,omitempty" bson:"tnano"` LogRev string `json:"rev,omitempty" bson:"rev"` LogPlat string `json:"plat,omitempty" bson:"plat"` LogSource string `json:"src,omitempty" bson:"src"` LogLevel string `json:"lvl,omitempty" bson:"lvl"` LogText string `json:"msg,omitempty" bson:"msg"` }
Entry log entry payload
type Filters ¶
type Filters *Entry
Filters uses a prototype Entry instance to filter the values. It honours the string fields: Device, Owner, Source, Level and Text, where a non-empty field will make the backend filter results by the field.