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

package logger

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


Package Files

logfile.go logger.go syslog.go


const (
    ERR = 1 << iota


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_mb int, max_rotation int) (err error)

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

func Info Uses

func Info(vars ...interface{})

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 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, tag string)

Opens connection to remote syslog, tag specifies application name that will be prefixed to syslog entry. ex: logger.RemoteSyslog("udp", "", "application_name") (+build !windows,!nacl,!plan9)

func Trace Uses

func Trace(vars ...interface{})

Log as Trace.

func Warn Uses

func Warn(vars ...interface{})

Log as Warn.

Package logger imports 11 packages (graph) and is imported by 1 packages. Updated 2018-03-07. Refresh now. Tools for package owners.