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
- func Debugf(format string, a ...any)
- func DisableColor()
- func Errorf(format string, a ...any)
- func Fatalf(format string, a ...any)
- func GetEnvVar() string
- func GetLevel() int
- func Infof(format string, a ...any)
- func SetLevel(l int, color bool)
- func SetWriter(io.Writer)
- func SyncLogrusLevel()
- func Verbosef(format string, a ...any)
- func Warningf(format string, a ...any)
- 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 Fatalf ¶
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 SyncLogrusLevel ¶ added in v4.4.0
func SyncLogrusLevel()
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) Logf ¶
func (t DebugLogger) Logf(format string, v ...any)
Logf is a dummy function doing nothing.
Click to show internal directories.
Click to hide internal directories.