To use GoCenter:
export GOPROXY=https://gocenter.io
bitbucket.org/matchmove/logs
January 1st 0001
Last Modified
0
Stars
Unknown
License
8
Downloads
ReadMe
Mod File
GoDocs
New
Security
Dependencies (0)
Used By (0)
Metrics
Versions
logs
– import “bitbucket.org/matchmove/logs”
Usage
const (
// NewInstanceMsg sets the message to indicate the start of the log
NewInstanceMsg = "START"
// EndInstanceMsg sets the message to indicate the end of the log
EndInstanceMsg = "END"
// LogLevelDebug defines a normal debug log
LogLevelDebug = "DEBUG"
// LogLevelPanic defines a panic log
LogLevelPanic = "PANIC"
// LogLevelFatal defines a fatal log
LogLevelFatal = "FATAL"
// DateFormat defines the log date format
DateFormat = time.RFC3339
)
type Entry
type Entry struct {
Level string
Message string
Time time.Time
}
Entry represents information about a rest server log entry.
type Log
type Log struct {
}
Log represents information about a rest server log.
func New
func New() *Log
New creates new instance of Log
func (*Log) Count
func (l *Log) Count() int
Count returns number of inserted logs
func (*Log) Dump
func (l *Log) Dump()
Dump will print all the messages to the io.
func (*Log) Entries
func (l *Log) Entries() []Entry
Entries returns all the entries
func (*Log) Fatal
func (l *Log) Fatal(v ...interface{})
Fatal is equivalent to Print() and followed by a call to os.Exit(1)
func (*Log) Identify
func (l *Log) Identify(tags ...string)
Identify log
func (*Log) LastEntry
func (l *Log) LastEntry() Entry
LastEntry returns the last inserted log
func (*Log) Panic
func (l *Log) Panic(v ...interface{})
Panic then throws a panic with the same message afterwards
func (*Log) Print
func (l *Log) Print(v ...interface{})
Print a regular log
func (*Log) SetIdentify
func (l *Log) SetIdentify(tag string)
SetIdentify log
func (*Log) ShowCount
func (l *Log) ShowCount(show bool)
ShowCount log
func (*Log) ThrowFatalTest
func (l *Log) ThrowFatalTest(msg string)
ThrowFatalTest allows Fatal to be testable
func (*Log) TimeMs
func (l *Log) TimeMs() int64
TimeMs …