Documentation ¶
Index ¶
- Constants
- func WithCaller() option
- func WithContext(ctx context.Context) option
- func WithFields(fields map[string]interface{}) option
- func WithFluent(value bool) option
- func WithLogLevel(level string) option
- func WithLogName(name string) option
- func WithMaxAge(interval time.Duration) option
- func WithRemoteAddr(addr string) option
- func WithRemoteProtocolType(protocol string) option
- func WithRotationCount(num int) option
- func WithRotationTime(interval time.Duration) option
- func WithTerminal(out bool) option
- func WithWatchEnable(enable bool) option
- func WithWatchLogsByNum(num int) option
- func WithWatchLogsBySize(size int64) option
- type Entry
- func (e Entry) Debug(args ...interface{})
- func (e Entry) Debugf(format string, args ...interface{})
- func (e Entry) Error(args ...interface{})
- func (e Entry) Errorf(format string, args ...interface{})
- func (e Entry) Fatal(args ...interface{})
- func (e Entry) Fatalf(format string, args ...interface{})
- func (e Entry) Info(args ...interface{})
- func (e Entry) Infof(format string, args ...interface{})
- func (e Entry) Panic(args ...interface{})
- func (e Entry) Panicf(format string, args ...interface{})
- func (e Entry) Warn(args ...interface{})
- func (e Entry) Warnf(format string, args ...interface{})
- func (e Entry) WithError(err error) *Entry
- func (e Entry) WithField(key string, value interface{}) *Entry
- func (e Entry) WithFields(fields Fields) *Entry
- type Fields
- type Log
Constants ¶
View Source
const ( LOCAL = "local" REMOTE = "remote" )
View Source
const ( DEFAULT_ROTATION_COUNT = 6 DEFAULT_WATCHER_FILES_BY_NUM = 6 DEFAULT_WATCHER_FILES_BY_SIZE = 10 * 1024 * 1024 )
View Source
const ( DEFAULT_LOG_NAME = "./log/default.log" DEFAULT_LOG_LEVEL = "debug" )
View Source
const ( LOG_DEBUG_LEVEL = "debug" LOG_INFO_LEVEL = "info" LOG_ERROR_LEVEL = "error" LOG_FATAL_LEVEL = "fatal" LOG_WARN_LEVEL = "warn" LOG_PANIC_LEVEL = "panic" )
View Source
const ( TCP = "tcp" UDP = "udp" HTTP = "http" HTTPS = "https" )
View Source
const (
DEFAULT_ROTATION_TIME = 24 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
func WithCaller ¶
func WithCaller() option
func WithContext ¶
func WithFields ¶
func WithFields(fields map[string]interface{}) option
func WithFluent ¶
func WithFluent(value bool) option
func WithLogLevel ¶
func WithLogLevel(level string) option
func WithLogName ¶
func WithLogName(name string) option
func WithMaxAge ¶
func WithRemoteAddr ¶
func WithRemoteAddr(addr string) option
func WithRemoteProtocolType ¶
func WithRemoteProtocolType(protocol string) option
func WithRotationCount ¶
func WithRotationCount(num int) option
func WithRotationTime ¶
func WithTerminal ¶
func WithTerminal(out bool) option
func WithWatchEnable ¶
func WithWatchEnable(enable bool) option
func WithWatchLogsByNum ¶
func WithWatchLogsByNum(num int) option
func WithWatchLogsBySize ¶
func WithWatchLogsBySize(size int64) option
Types ¶
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
func (Entry) WithFields ¶
Click to show internal directories.
Click to hide internal directories.