logs

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

*

  • @api post logs. *
  • User: yunshengzhu
  • Date: 2022/5/10
  • Time: 7:35 PM

*

  • @api post logs. *
  • User: yunshengzhu
  • Date: 2022/5/4
  • Time: 1:14 PM

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHook

func NewHook(levels ...logrus.Level) logrus.Hook

自定义hook

func WithCompress

func WithCompress(compress bool) loggerOptions

func WithEsAddress

func WithEsAddress(esAddress []string) loggerOptions

func WithEsPassword

func WithEsPassword(esPassword string) loggerOptions

func WithEsUser

func WithEsUser(esUser string) loggerOptions

func WithFilePath

func WithFilePath(filePath string) loggerOptions

func WithFormat

func WithFormat(format string) loggerOptions

func WithIsColor

func WithIsColor(isColor bool) loggerOptions

func WithLevel

func WithLevel(level uint32) loggerOptions

func WithMaxAge

func WithMaxAge(maxAge int) loggerOptions

func WithMaxBackups

func WithMaxBackups(maxBackups int) loggerOptions

func WithMaxSize

func WithMaxSize(maxSize int) loggerOptions

func WithPrettyPrint

func WithPrettyPrint(prettyPrint bool) loggerOptions

func WithServerName

func WithServerName(serverName string) loggerOptions

Types

type Level

type Level logrus.Level

type Logger

type Logger struct {
	*logrus.Logger
	ServerName string
}
var Log *Logger

func NewLogger

func NewLogger(options ...loggerOptions) *Logger

Jump to

Keyboard shortcuts

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