logger

package
v0.0.0-...-3ada85e Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultInvokerCfg = CallerCfg{
	Type:            "console",
	Level:           7,
	Path:            "",
	Maxlines:        1000000,
	Maxsize:         256,
	Daily:           true,
	Maxdays:         7,
	Rotate:          true,
	Perm:            "0660",
	Separate:        "",
	ReconnectOnMsg:  false,
	Reconnect:       false,
	Net:             "",
	Addr:            "",
	Username:        "",
	Password:        "",
	Host:            "",
	SendTos:         "",
	Subject:         "Diagnostic message from server",
	Dsn:             "",
	Authorname:      "",
	Title:           "",
	Webhookurl:      "",
	Redirecturl:     "",
	Imageurl:        "",
	SlackWebhookurl: "",
}

Functions

func DefaultBuild

func DefaultBuild() module.Invoker

Types

type CallerCfg

type CallerCfg struct {
	//	Type   = "console"
	//	Type      = "file"
	//	Type = "multifile"
	//	Type      = "smtp"
	//	Type      = "conn"
	//	Type        = "es"
	//	Type  = "jianliao"
	//	Type     = "slack"
	//	Type     = "alils"
	Type  string `ini:"type"`
	Level int    `ini:"level"`
	//file
	Path     string `ini:"path"`
	Maxlines int    `ini:"maxlines"`
	Maxsize  int    `ini:"maxsize"`
	Daily    bool   `ini:"daily"`
	Maxdays  int    `ini:"maxdays"`
	Rotate   bool   `ini:"rotate"`
	Perm     string `ini:"perm"`
	//multifile
	Separate string `ini:"separate"`
	//conn
	ReconnectOnMsg bool   `ini:"reconnectOnMsg"`
	Reconnect      bool   `ini:"reconnect"`
	Net            string `ini:"net"`
	Addr           string `ini:"addr"`
	//smtp
	Username string `ini:"username"`
	Password string `ini:"password"`
	Host     string `ini:"host"`
	SendTos  string `ini:"sendTos"`
	Subject  string `ini:"subject"`
	//ElasticSearch
	Dsn string `ini:"dsn"`
	//jianliao
	Authorname  string `ini:"authorname"`
	Title       string `ini:"title"`
	Webhookurl  string `ini:"webhookurl"`
	Redirecturl string `ini:"redirecturl"`
	Imageurl    string `ini:"imageurl"`
	//slack
	SlackWebhookurl string `ini:"slackWebhookurl"`
}

type Client

type Client struct {
	*logs.BeeLogger
	// contains filtered or unexported fields
}

func Invoker

func Invoker(name string) *Client

func Provider

func Provider(cfg CallerCfg) *Client

Jump to

Keyboard shortcuts

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