Documentation ¶
Overview ¶
Package thriftlion defines the Thrift functionality for lion.
Index ¶
- Variables
- func Debug(event thrift.TStruct)
- func DebugWriter() io.Writer
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func Error(event thrift.TStruct)
- func ErrorWriter() io.Writer
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Fatal(event thrift.TStruct)
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func Flush() error
- func Info(event thrift.TStruct)
- func InfoWriter() io.Writer
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func LionLogger() lion.Logger
- func MustRegister(constructor interface{})
- func Panic(event thrift.TStruct)
- func Panicf(format string, args ...interface{})
- func Panicln(args ...interface{})
- func Print(event thrift.TStruct)
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func Register(constructor interface{}) error
- func Warn(event thrift.TStruct)
- func WarnWriter() io.Writer
- func Warnf(format string, args ...interface{})
- func Warnln(args ...interface{})
- func Writer() io.Writer
- type Entry
- func (p *Entry) GetContext() []*EntryMessage
- func (p *Entry) GetEvent() *EntryMessage
- func (p *Entry) GetFields() map[string]string
- func (p *Entry) GetID() string
- func (p *Entry) GetLevel() Level
- func (p *Entry) GetMessage() string
- func (p *Entry) GetTimeUnixNanos() int64
- func (p *Entry) GetWriterOutput() []byte
- func (p *Entry) IsSetContext() bool
- func (p *Entry) IsSetEvent() bool
- func (p *Entry) IsSetFields() bool
- func (p *Entry) IsSetID() bool
- func (p *Entry) IsSetLevel() bool
- func (p *Entry) IsSetMessage() bool
- func (p *Entry) IsSetTimeUnixNanos() bool
- func (p *Entry) IsSetWriterOutput() bool
- func (p *Entry) Read(iprot thrift.TProtocol) error
- func (p *Entry) ReadField1(iprot thrift.TProtocol) error
- func (p *Entry) ReadField2(iprot thrift.TProtocol) error
- func (p *Entry) ReadField3(iprot thrift.TProtocol) error
- func (p *Entry) ReadField4(iprot thrift.TProtocol) error
- func (p *Entry) ReadField5(iprot thrift.TProtocol) error
- func (p *Entry) ReadField6(iprot thrift.TProtocol) error
- func (p *Entry) ReadField7(iprot thrift.TProtocol) error
- func (p *Entry) ReadField8(iprot thrift.TProtocol) error
- func (p *Entry) String() string
- func (p *Entry) Write(oprot thrift.TProtocol) error
- type EntryMessage
- func (p *EntryMessage) GetEncoding() string
- func (p *EntryMessage) GetName() string
- func (p *EntryMessage) GetValue() []byte
- func (p *EntryMessage) IsSetEncoding() bool
- func (p *EntryMessage) IsSetName() bool
- func (p *EntryMessage) IsSetValue() bool
- func (p *EntryMessage) Read(iprot thrift.TProtocol) error
- func (p *EntryMessage) ReadField1(iprot thrift.TProtocol) error
- func (p *EntryMessage) ReadField2(iprot thrift.TProtocol) error
- func (p *EntryMessage) ReadField3(iprot thrift.TProtocol) error
- func (p *EntryMessage) String() string
- func (p *EntryMessage) Write(oprot thrift.TProtocol) error
- type Level
- type LevelLogger
- type Logger
- func AtLevel(level lion.Level) Logger
- func GlobalLogger() Logger
- func NewLogger(delegate lion.Logger) Logger
- func WithContext(context thrift.TStruct) Logger
- func WithField(key string, value interface{}) Logger
- func WithFields(fields map[string]interface{}) Logger
- func WithKeyValues(keyValues ...interface{}) Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Encoding is the name of the encoding.
Encoding = "thrift-binary"
)
View Source
var EntryMessage_Encoding_DEFAULT string
View Source
var EntryMessage_Name_DEFAULT string
View Source
var EntryMessage_Value_DEFAULT []byte
View Source
var Entry_Context_DEFAULT []*EntryMessage
View Source
var Entry_ID_DEFAULT string
View Source
var Entry_Message_DEFAULT string
View Source
var Entry_TimeUnixNanos_DEFAULT int64
View Source
var Entry_WriterOutput_DEFAULT []byte
View Source
var GoUnusedProtection__ int
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf calls Debugf on the global Logger.
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf calls Errorf on the global Logger.
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf calls Fatalf on the global Logger.
func MustRegister ¶
func MustRegister(constructor interface{})
MustRegister calls Register and panics on error.
func Panicf ¶
func Panicf(format string, args ...interface{})
Panicf calls Panicf on the global Logger.
func Printf ¶
func Printf(format string, args ...interface{})
Printf calls Printf on the global Logger.
Types ¶
type Entry ¶
type Entry struct { ID *string `thrift:"id,1" db:"id" json:"id,omitempty"` Level *Level `thrift:"level,2" db:"level" json:"level,omitempty"` TimeUnixNanos *int64 `thrift:"time_unix_nanos,3" db:"time_unix_nanos" json:"time_unix_nanos,omitempty"` Context []*EntryMessage `thrift:"context,4" db:"context" json:"context,omitempty"` Fields map[string]string `thrift:"fields,5" db:"fields" json:"fields,omitempty"` Event *EntryMessage `thrift:"event,6" db:"event" json:"event,omitempty"` Message *string `thrift:"message,7" db:"message" json:"message,omitempty"` WriterOutput []byte `thrift:"writer_output,8" db:"writer_output" json:"writer_output,omitempty"` }
Attributes:
- ID
- Level
- TimeUnixNanos
- Context
- Fields
- Event
- Message
- WriterOutput
func (*Entry) GetContext ¶
func (p *Entry) GetContext() []*EntryMessage
func (*Entry) GetEvent ¶
func (p *Entry) GetEvent() *EntryMessage
type EntryMessage ¶
type EntryMessage struct { Encoding *string `thrift:"encoding,1" db:"encoding" json:"encoding,omitempty"` Name *string `thrift:"name,2" db:"name" json:"name,omitempty"` Value []byte `thrift:"value,3" db:"value" json:"value,omitempty"` }
Attributes:
- Encoding
- Name
- Value
var Entry_Event_DEFAULT *EntryMessage
func NewEntryMessage ¶
func NewEntryMessage() *EntryMessage
func (*EntryMessage) GetEncoding ¶
func (p *EntryMessage) GetEncoding() string
func (*EntryMessage) GetName ¶
func (p *EntryMessage) GetName() string
func (*EntryMessage) GetValue ¶
func (p *EntryMessage) GetValue() []byte
func (*EntryMessage) IsSetEncoding ¶
func (p *EntryMessage) IsSetEncoding() bool
func (*EntryMessage) IsSetName ¶
func (p *EntryMessage) IsSetName() bool
func (*EntryMessage) IsSetValue ¶
func (p *EntryMessage) IsSetValue() bool
func (*EntryMessage) Read ¶
func (p *EntryMessage) Read(iprot thrift.TProtocol) error
func (*EntryMessage) ReadField1 ¶
func (p *EntryMessage) ReadField1(iprot thrift.TProtocol) error
func (*EntryMessage) ReadField2 ¶
func (p *EntryMessage) ReadField2(iprot thrift.TProtocol) error
func (*EntryMessage) ReadField3 ¶
func (p *EntryMessage) ReadField3(iprot thrift.TProtocol) error
func (*EntryMessage) String ¶
func (p *EntryMessage) String() string
func (*EntryMessage) Write ¶
func (p *EntryMessage) Write(oprot thrift.TProtocol) error
type LevelLogger ¶
type LevelLogger interface { lion.BaseLevelLogger WithField(key string, value interface{}) LevelLogger WithFields(fields map[string]interface{}) LevelLogger WithKeyValues(keyvalues ...interface{}) LevelLogger WithContext(context thrift.TStruct) LevelLogger Print(event thrift.TStruct) }
LevelLogger is a lion.LevelLogger that also has proto logging methods.
type Logger ¶
type Logger interface { lion.BaseLogger AtLevel(level lion.Level) Logger WithField(key string, value interface{}) Logger WithFields(fields map[string]interface{}) Logger WithKeyValues(keyValues ...interface{}) Logger WithContext(context thrift.TStruct) Logger Debug(event thrift.TStruct) Info(event thrift.TStruct) Warn(event thrift.TStruct) Error(event thrift.TStruct) Fatal(event thrift.TStruct) Panic(event thrift.TStruct) Print(event thrift.TStruct) // NOTE: this function name may change, this is experimental LogDebug() LevelLogger // NOTE: this function name may change, this is experimental LogInfo() LevelLogger LionLogger() lion.Logger }
Logger is a lion.Logger that also has proto logging methods.
func WithContext ¶
WithContext calls WithContext on the global Logger.
func WithField ¶
WithField calls WithField on the global Logger.
func WithFields ¶
WithFields calls WithFields on the global Logger.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.