spacelog: github.com/spacemonkeygo/spacelog/setup Index | Files

package setup

import "github.com/spacemonkeygo/spacelog/setup"

Package setup provides simple helpers for configuring spacelog from flags.

This package adds the following flags:

--log.output - can either be stdout, stderr, syslog, or a file path
--log.level - the base logger level
--log.filter - loggers that match this regular expression get set to the
    lowest level
--log.format - a go text template for log lines
--log.stdlevel - the logger level to assume the standard library logger is
    using
--log.subproc - a process to run for stdout/stderr capturing
--log.buffer - the number of message to buffer

Index

Package Files

setup.go

func MustSetup Uses

func MustSetup(procname string)

MustSetup calls spacelog.MustSetup with a flag-configured config struct It's pretty useless to call this method without parsing flags first, via flagfile.Load()

func MustSetupWithFacility Uses

func MustSetupWithFacility(procname string, facility spacelog.SyslogPriority)

MustSetupWithFacility is deprecated and will be removed soon. Please configure facility through the facility flag option.

func SetFormatMethod Uses

func SetFormatMethod(name string, fn interface{})

SetFormatMethod in this subpackage is deprecated and will be removed soon. Please see spacelog.SetFormatMethod instead

func Setup Uses

func Setup(procname string) error

Setup calls spacelog.Setup with a flag-configured config struct It's pretty useless to call this method without parsing flags first, via flagfile.Load()

func SetupWithFacility Uses

func SetupWithFacility(procname string,
    facility spacelog.SyslogPriority) error

SetupWithFacility is deprecated and will be removed soon. Please configure facility through the facility flag option.

Package setup imports 2 packages (graph) and is imported by 3 packages. Updated 2018-04-09. Refresh now. Tools for package owners.