Documentation ¶
Overview ¶
Package sylog implements a basic logger for Apptainer Go code to log messages in the same format as apptainer_message() from C code
Index ¶
- Constants
- func Debugf(format string, a ...interface{})
- func DisableColor()
- func Errorf(format string, a ...interface{})
- func Fatalf(format string, a ...interface{})
- func GetEnvVar() string
- func GetLevel() int
- func Infof(format string, a ...interface{})
- func SetLevel(l int, color bool)
- func Verbosef(format string, a ...interface{})
- func Warningf(format string, a ...interface{})
- func Writer() io.Writer
- type DebugLogger
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 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 Verbosef ¶
func Verbosef(format string, a ...interface{})
Verbosef is a dummy function doing nothing.
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
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.
Click to show internal directories.
Click to hide internal directories.