Documentation ¶
Index ¶
- Constants
- Variables
- func AppID(string)
- func Date(string)
- func ErrorCode(string)
- func ErrorMsg(string)
- func EventID(string)
- func Host(string)
- func Metadata(map[string]string)
- func NameSpace(string)
- func Object(interface{})
- func Package(string)
- func RequestID(string)
- func Route(string)
- func ServerID(string)
- func Timestamp(int64)
- func UserAgent(string)
- func UserID(string)
- type AdapterLogger
- type Elk
- type Entry
- func (entry *Entry) Debug(msg string)
- func (entry *Entry) Error(msg string)
- func (elk *Entry) ErrorMsg(value string) *Entry
- func (elk *Entry) ErrorReport(value string) *Entry
- func (elk *Entry) EventId(value string) *Entry
- func (elk *Entry) EventParam(params interface{}) *Entry
- func (entry *Entry) Flush() *Entry
- func (entry *Entry) Info(msg string)
- func (entry *Entry) Int(key string, value int) *Entry
- func (entry *Entry) Int32(key string, value int32) *Entry
- func (entry *Entry) Int64(key string, value int64) *Entry
- func (elk *Entry) Metadata(data map[string]string) *Entry
- func (entry *Entry) MustAppend() *Entry
- func (elk *Entry) MustAppendContext(ctx context.Context) *Entry
- func (elk *Entry) MustAppendFromGinContext(ctx *gin.Context) *Entry
- func (elk *Entry) NameSpace(value string) *Entry
- func (entry *Entry) Object(key string, value interface{}) *Entry
- func (elk *Entry) Rparam(params interface{}) *Entry
- func (entry *Entry) String(key string, value string) *Entry
- func (elk *Entry) SubEventId(value string) *Entry
- func (elk *Entry) UseID(value string) *Entry
- func (entry *Entry) Warning(msg string)
- type Level
- type Log
- type Logger
- type TYFields
Constants ¶
View Source
const Version = "v1.0.2"
Variables ¶
View Source
var ErrorAdapter = errors.New("please set log adapter")
Functions ¶
Types ¶
type AdapterLogger ¶
type Entry ¶
func (*Entry) MustAppendContext ¶
MustAppendContext context
func (*Entry) MustAppendFromGinContext ¶
MustAppendFromGinContext 使用gin context
type Log ¶ added in v1.0.3
type Log struct {
// contains filtered or unexported fields
}
log tylog日志
func NewLogger ¶ added in v1.0.3
func NewLogger(adapterLogger AdapterLogger, msg string) *Log
NewLogger 创建新的日志组件
func (*Log) WithElkEntry ¶ added in v1.0.3
NewEntry creates a elk entry
Directories ¶
Path | Synopsis |
---|---|
lib
|
|
beego
Package logs provide a general log interface Usage: import "github.com/astaxie/beego/logs" log := NewLogger(10000) log.SetLogger("console", "") > the first params stand for how many channel Use it like this: log.Trace("trace") log.Info("info") log.Warn("warning") log.Debug("debug") log.Critical("critical") more docs http://beego.me/docs/module/logs.md Copyright 2014 mqant Author.
|
Package logs provide a general log interface Usage: import "github.com/astaxie/beego/logs" log := NewLogger(10000) log.SetLogger("console", "") > the first params stand for how many channel Use it like this: log.Trace("trace") log.Info("info") log.Warn("warning") log.Debug("debug") log.Critical("critical") more docs http://beego.me/docs/module/logs.md Copyright 2014 mqant Author. |
Click to show internal directories.
Click to hide internal directories.