hlog

package module
v0.0.0-...-db2d249 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: MIT Imports: 13 Imported by: 0

README

hlog

High Performance Logging on golang

Documentation

Index

Constants

View Source
const (
	HLOG_ACTION_FILE   = "file"
	HLOG_ACTION_STDERR = "stderr"
	HLOG_ACTION_STDOUT = "stdout"
	HLOG_ACTION_SYSLOG = "syslog"
)

Variables

This section is empty.

Functions

func Fatal

func Fatal(v ...interface{})

func Fatalf

func Fatalf(format string, v ...interface{})

func Fatalln

func Fatalln(v ...interface{})

func LevelAdd

func LevelAdd(cfg LevelConfig) error

func LevelGetById

func LevelGetById(id int) level

func LevelGetByName

func LevelGetByName(name string) level

func NewFormat

func NewFormat(name string, fmat string) error

func Panic

func Panic(v ...interface{})

func Panicf

func Panicf(format string, v ...interface{})

func Panicln

func Panicln(v ...interface{})

func Print

func Print(v ...interface{})

func Printf

func Printf(format string, v ...interface{})

func Println

func Println(v ...interface{})

func SpecClass

func SpecClass(buf *buffer, sp *spec, f *format, evt *event) error

func SpecEnd

func SpecEnd(buf *buffer, sp *spec, f *format, evt *event) error

func SpecFile

func SpecFile(buf *buffer, sp *spec, f *format, evt *event) error

func SpecFunction

func SpecFunction(buf *buffer, sp *spec, f *format, evt *event) error

func SpecHostname

func SpecHostname(buf *buffer, sp *spec, f *format, evt *event) error

func SpecLevelLowercase

func SpecLevelLowercase(buf *buffer, sp *spec, f *format, evt *event) error

func SpecLevelUppercase

func SpecLevelUppercase(buf *buffer, sp *spec, f *format, evt *event) error

func SpecLine

func SpecLine(buf *buffer, sp *spec, f *format, evt *event) error

func SpecPercent

func SpecPercent(buf *buffer, sp *spec, f *format, evt *event) error

func SpecPid

func SpecPid(buf *buffer, sp *spec, f *format, evt *event) error

func SpecStack

func SpecStack(buf *buffer, sp *spec, f *format, evt *event) error

func SpecString

func SpecString(buf *buffer, sp *spec, f *format, evt *event) error

func SpecTimeStamp

func SpecTimeStamp(buf *buffer, sp *spec, f *format, evt *event) error

%d()

func SpecUsermsg

func SpecUsermsg(buf *buffer, sp *spec, f *format, evt *event) error

Types

type DefaultConfig

type DefaultConfig struct {
	Format string     `yaml:"format"`
	File   FileConfig `yaml:"file"`
}

type FileConfig

type FileConfig struct {
	Path      string `yaml:"path"`
	MaxSize   string `yaml:"maxsize"`
	SyncSize  string `yaml:"syncsize"`
	MaxNumber int    `yaml:"number"`
	SyncTimes int    `yaml:"synctimes"`
}

type FormatConfig

type FormatConfig struct {
	Name   string `yaml:"name"`
	Format string `yaml:"format"`
}

type HLogConfig

type HLogConfig struct {
	Default DefaultConfig  `yaml:"default"`
	Levels  []LevelConfig  `yaml:"levels"`
	Formats []FormatConfig `yaml:"formats"`
	Rules   []RuleConfig   `yaml:"rules"`
}

type LevelConfig

type LevelConfig struct {
	Name   string `yaml:"name"`
	Level  int    `yaml:"level"`
	Syslog string `yaml:"syslog"`
}

type RuleConfig

type RuleConfig struct {
	Type   string     `yaml:"type"`
	Level  string     `yaml:"level"`
	Action string     `yaml:"action"`
	Syslog string     `yaml:"syslog"`
	File   FileConfig `yaml:"file"`
}

type TRANSFER

type TRANSFER func(*buffer, *spec, *format, *event) error

type Width

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

%-20.30c

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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