sylog

package
v3.1.0-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package sylog implements a basic logger for Singularity Go code to log messages in the same format as singularity_message() from C code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

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

Debugf writes a DEBUG level message to the log.

func Errorf

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

Errorf writes an ERROR level message to the log but does not exit. This should be called when an error is being returned to the calling thread

func Fatalf

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

Fatalf is equivalent to a call to Errorf followed by os.Exit(255). Code that may be imported by other projects should NOT use Fatalf.

func GetEnvVar

func GetEnvVar() string

GetEnvVar returns a formatted environment variable string which can later be interpreted by init() in a child proc

func GetLevel

func GetLevel() int

GetLevel returns the current log level as integer

func Infof

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

Infof writes an INFO level message to the log. By default, INFO level messages will always be output (unless running in silent)

func SetLevel

func SetLevel(l int)

SetLevel explicitly sets the loggerLevel

func Verbosef

func Verbosef(format string, a ...interface{})

Verbosef writes a VERBOSE level message to the log. This should probably be deprecated since the granularity is often too fine to be useful.

func Warningf

func Warningf(format string, a ...interface{})

Warningf writes a WARNING level message to the log.

func Writer

func Writer() io.Writer

Writer returns an io.Writer to pass to an external packages logging utility. i.e when --quiet option is set, this function returns ioutil.Discard writer to ignore output

Types

This section is empty.

Jump to

Keyboard shortcuts

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