log

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

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-log

log for go

Documentation

Index

Constants

View Source
const (
	DefaultFileName         = "logs/log-%Y-%m-%d.log"
	DefaultFileMaxAge       = time.Hour * 24 * 30
	DefaultFileRotationTime = time.Hour * 24
)
View Source
const (
	DefaultLocalTimeDateFormat = "2006-01-02 15:04:05"

	ConsoleLog = iota
	FileLog
	SocketLog
)

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func DefaultFile

func DefaultFile() (*lfshook.LfsHook, error)

func DefaultWebSocketLog

func DefaultWebSocketLog() *lfshook.LfsHook

func Error

func Error(args ...interface{})

func Fatal

func Fatal(args ...interface{})

func Info

func Info(args ...interface{})

func LoadConsoleLog

func LoadConsoleLog()

func LoadFileLog

func LoadFileLog()

func LoadLog

func LoadLog(codes ...int)

func LoadWebSocketLog

func LoadWebSocketLog()

func Read

func Read(ws *neffos.Server)

func Socket

func Socket(t string, args interface{})

func Warn

func Warn(args ...interface{})

Types

type Message

type Message struct {
	Status  bool        `json:"status"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type Response

type Response struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"`
}

type WebJSONFormatter

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

func (*WebJSONFormatter) Format

func (wj *WebJSONFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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