skynet: Index | Files

package log

import ""

Package log provides syslog logging to a local or remote Syslog logger. To specify a remote syslog host, set the "log.sysloghost" key in the Skynet configuration. Specify the port with "log.syslogport". If "log.sysloghost" is not provided, skynet will log to local syslog.


Package Files

log.go multiwriter.go

func Debug Uses

func Debug(messages ...interface{})

func Debugf Uses

func Debugf(format string, messages ...interface{})

func Error Uses

func Error(messages ...interface{})

func Errorf Uses

func Errorf(format string, messages ...interface{})

func Fatal Uses

func Fatal(messages ...interface{})

func Fatalf Uses

func Fatalf(format string, messages ...interface{})

func Info Uses

func Info(messages ...interface{})

func Infof Uses

func Infof(format string, messages ...interface{})

func Initialize Uses

func Initialize()

Call Initialize after setting (or not setting) SyslogHost and SyslogPort when they're read from configuration source.

func Panic Uses

func Panic(messages ...interface{})

func Panicf Uses

func Panicf(format string, messages ...interface{})

func Printf Uses

func Printf(level LogLevel, format string, messages ...interface{})

func Println Uses

func Println(level LogLevel, messages ...interface{})

func SetLogLevel Uses

func SetLogLevel(level LogLevel)

func SetSyslogHost Uses

func SetSyslogHost(host string)

func SetSyslogPort Uses

func SetSyslogPort(port int)

func Trace Uses

func Trace(messages ...interface{})

func Tracef Uses

func Tracef(format string, messages ...interface{})

func Warn Uses

func Warn(messages ...interface{})

func Warnf Uses

func Warnf(format string, messages ...interface{})

type LogLevel Uses

type LogLevel int8
const (
    TRACE LogLevel = iota

func GetLogLevel Uses

func GetLogLevel() LogLevel

func LevelFromString Uses

func LevelFromString(l string) (level LogLevel)

type MultiWriter Uses

type MultiWriter struct {
    // contains filtered or unexported fields

func NewMultiWriter Uses

func NewMultiWriter(writers *MultiWriter

func (*MultiWriter) AddWriter Uses

func (mw *MultiWriter) AddWriter(w io.Writer)

func (*MultiWriter) Write Uses

func (mw *MultiWriter) Write(p []byte) (n int, err error)

Package log imports 4 packages (graph) and is imported by 71 packages. Updated 2019-07-22. Refresh now. Tools for package owners.