Entry

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2020 License: MIT, Unlicense, Unlicense Imports: 5 Imported by: 0

Documentation

Overview

Package Entry is a message type for logi log entries

Index

Constants

This section is empty.

Variables

View Source
var EntryMagic = []byte{'e', 'n', 't', 'r'}

Functions

This section is empty.

Types

type Container

type Container struct {
	simplebuffer.Container
}

func Get

func Get(ent *Entry) Container

func LoadContainer

func LoadContainer(b []byte) (out *Container)

LoadContainer takes a message byte slice payload and loads it into a container ready to be decoded

func (*Container) GetCodeLocation

func (c *Container) GetCodeLocation() string

func (*Container) GetLevel

func (c *Container) GetLevel() string

func (*Container) GetPackage

func (c *Container) GetPackage() string

func (*Container) GetText

func (c *Container) GetText() string

func (*Container) GetTime

func (c *Container) GetTime() time.Time

func (*Container) String

func (c *Container) String() (s string)

func (*Container) Struct

func (c *Container) Struct() (out *Entry)

Struct deserializes the data all in one go by calling the field deserializing functions into a structure containing the fields. The height is given in this report as it is part of the job message and makes it faster for clients to look up the algorithm name according to the block height, which can change between hard fork versions

type Entry

type Entry struct {
	Time         time.Time
	Level        string
	Package      string
	CodeLocation string
	Text         string
}

Entry is a log entry to be printed as json to the log file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL