loglib

package
v0.0.0-...-4d122b3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG   = 0
	INFO    = 1
	WARNING = 2
	ERROR   = 3
)

Variables

View Source
var HeartBeatPort = ""

Functions

func Debug

func Debug(msg string)

func Error

func Error(msg string)

func Info

func Info(msg string)

func Init

func Init(config map[string]string)

func SetLevel

func SetLevel(level int)

func Warning

func Warning(msg string)

Types

type FileLog

type FileLog struct {
	// contains filtered or unexported fields
}

func NewFileLog

func NewFileLog(dir string, level int) *FileLog

func (*FileLog) Debug

func (l *FileLog) Debug(msg string)

func (*FileLog) Error

func (l *FileLog) Error(msg string)

func (*FileLog) Info

func (l *FileLog) Info(msg string)

func (*FileLog) SetLevel

func (l *FileLog) SetLevel(level int) bool

设置日志级别,低于该级别的日志将不输出

func (*FileLog) Warning

func (l *FileLog) Warning(msg string)

type Log

type Log interface {
	SetLevel(level int) bool
	Debug(msg string)
	Info(msg string)
	Warning(msg string)
	Error(msg string)
}

type LogAgent

type LogAgent struct {
	// contains filtered or unexported fields
}

type NetLog

type NetLog struct {
	// contains filtered or unexported fields
}

func NewNetLog

func NewNetLog(addr string, level int) *NetLog

func (*NetLog) Debug

func (l *NetLog) Debug(msg string)

func (*NetLog) Error

func (l *NetLog) Error(msg string)

func (*NetLog) Info

func (l *NetLog) Info(msg string)

func (*NetLog) SetLevel

func (l *NetLog) SetLevel(level int) bool

设置日志级别,低于该级别的日志将不输出

func (*NetLog) Warning

func (l *NetLog) Warning(msg string)

Jump to

Keyboard shortcuts

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