go-logger: github.com/cmcoffee/go-logger Index | Files

package logger

import "github.com/cmcoffee/go-logger"

Index

Package Files

logfile.go logger.go syslog.go

Constants

const (
    ERR = 1 << iota
    WARN
    INFO
    NOTICE
    DEBUG
    TRACE
    FATAL
    ALL
)

Variables

var DebugLogging = false

Enables or Disables Debug Logging

var TraceLogging = false

Enables or Disables Trace Logging

func CloseSyslog Uses

func CloseSyslog()

Close connection to remote syslog.

func Debug Uses

func Debug(vars ...interface{})

Log as Debug.

func Err Uses

func Err(vars ...interface{})

Log as Error.

func Fatal Uses

func Fatal(vars ...interface{})

Log as Fatal, then quit.

func File Uses

func File(logger int, filename string, max_size int64, max_rotation int) (err error)

Opens a new log file for writing, max_size is threshold for rotation, max_rotation is number of previous logs to hold on to.

func Log Uses

func Log(vars ...interface{})

Log as Info.

func Notice Uses

func Notice(vars ...interface{})

Log as Notice.

func Notify Uses

func Notify(c chan os.Signal)

Sets channel for notifying when logger.Fatal is used.

func Put Uses

func Put(vars ...interface{})

Don't log, only display via fmt.Printf.

func SetFlags Uses

func SetFlags(logger int, flag int)

Change flag settings for logger(s).

func SetOutput Uses

func SetOutput(logger int, w io.Writer)

Change output for logger(s).

func Syslog Uses

func Syslog(network, raddr string, tag string)

Opens connection to remote syslog, tag specifies application name that will be prefixed to syslog entry. ex: logger.RemoteSyslog("udp", "192.168.0.4:514", "application_name")

func Trace Uses

func Trace(vars ...interface{})

Log as Trace.

func Warn Uses

func Warn(vars ...interface{})

Log as Warn.

Package logger imports 13 packages (graph) and is imported by 1 packages. Updated 2017-10-15. Refresh now. Tools for package owners.