logger

package
v0.0.0-...-02b4230 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

*

*
* @author liangjf
* @create on 2020/5/20
* @version 1.0

*

*
* @author liangjf
* @create on 2020/5/20
* @version 1.0

*

*
* @author liangjf
* @create on 2020/5/20
* @version 1.0

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	Name:     "gpusher",
	Dir:      ".",
	Level:    6,
	Interval: 1,
	Host:     "127.0.0.1",
	TimeOut:  3 * time.Second,
}

Functions

This section is empty.

Types

type ILogger

type ILogger interface {
	Init(...Option)
	Trace(format string, args ...interface{})
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Warn(format string, args ...interface{})
	Error(format string, args ...interface{})
}

type Option

type Option func(*Options)

func Dir

func Dir(dir string) Option

func Host

func Host(host string) Option

func Interval

func Interval(interval int) Option

func Level

func Level(level int) Option

func Name

func Name(name string) Option

func TimeOut

func TimeOut(timeOut time.Duration) Option

type Options

type Options struct {
	Name     string
	Dir      string
	Level    int
	Interval int

	Host    string
	TimeOut time.Duration
}

Directories

Path Synopsis
* * * @author liangjf * @create on 2020/5/20 * @version 1.0
* * * @author liangjf * @create on 2020/5/20 * @version 1.0
* * * @author liangjf * @create on 2020/5/21 * @version 1.0
* * * @author liangjf * @create on 2020/5/21 * @version 1.0
* * * @author liangjf * @create on 2020/5/20 * @version 1.0
* * * @author liangjf * @create on 2020/5/20 * @version 1.0

Jump to

Keyboard shortcuts

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