log

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDamonNomadLogSuffix = ".damon.log"
View Source
const DefaultLogName = "damon.log"

Variables

This section is empty.

Functions

This section is empty.

Types

type LogConfig

type LogConfig struct {
	MaxLogFiles    int
	MaxSizeMB      int
	LogDir         string
	LogName        string
	NomadAllocDir  string
	NomadTaskName  string
	NomadLogSuffix string
}

func (LogConfig) Dir

func (c LogConfig) Dir() (string, error)

func (LogConfig) Name

func (c LogConfig) Name() string

func (LogConfig) Path

func (c LogConfig) Path() (string, error)

type Logger

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

func NewLogger

func NewLogger(cfg LogConfig) (Logger, error)

func (Logger) Error

func (l Logger) Error(err error, msg string)

func (Logger) Logf

func (l Logger) Logf(format string, v ...interface{})

func (Logger) Logln

func (l Logger) Logln(v ...interface{})

func (Logger) WithFields

func (l Logger) WithFields(fs map[string]interface{}) Logger

Jump to

Keyboard shortcuts

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