sylog

package
v4.1.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: BSD-3-Clause Imports: 2 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

View Source
const (
	FatalLevel messageLevel = iota - 4 // FatalLevel    : -4
	ErrorLevel                         // ErrorLevel    : -3
	WarnLevel                          // WarnLevel     : -2
	LogLevel                           // LogLevel      : -1

	InfoLevel     // InfoLevel     : 1
	VerboseLevel  // VerboseLevel  : 2
	Verbose2Level // Verbose2Level : 3
	Verbose3Level // Verbose3Level : 4
	DebugLevel    // DebugLevel    : 5
)

Log levels.

Variables

This section is empty.

Functions

func Debugf

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

Debugf is a dummy function doing nothing

func DisableColor

func DisableColor()

DisableColor for the logger

func Errorf

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

Errorf is a dummy function doing nothing.

func Fatalf

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

Fatalf is a dummy function exiting with code 255. This function must not be used in public packages.

func GetEnvVar

func GetEnvVar() string

GetEnvVar is a dummy function returning environment variable with lowest message level.

func GetLevel

func GetLevel() int

GetLevel is a dummy function returning lowest message level.

func Infof

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

Infof is a dummy function doing nothing.

func SetLevel

func SetLevel(l int, color bool)

SetLevel is a dummy function doing nothing.

func Verbosef

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

Verbosef is a dummy function doing nothing.

func Warningf

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

Warningf is a dummy function doing nothing.

func Writer

func Writer() io.Writer

Writer is a dummy function returning io.Discard writer.

Types

type DebugLogger

type DebugLogger struct{}

DebugLogger is an implementation of the go-log/log Logger interface that will output log messages via sylog.debug when required by external packages such as the scs-library-client

func (DebugLogger) Log

func (t DebugLogger) Log(v ...interface{})

Log is a dummy function doing nothing.

func (DebugLogger) Logf

func (t DebugLogger) Logf(format string, v ...interface{})

Logf is a dummy function doing nothing.

Jump to

Keyboard shortcuts

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