setup

package
v0.0.0-...-2296661 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: Apache-2.0 Imports: 2 Imported by: 9

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustSetup

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

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

func SetFormatMethod(name string, fn interface{})

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

func Setup

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

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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