Documentation ¶
Index ¶
- Constants
- func Close()
- func Debugf(format string, v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func InitLogFile(logConfig config.LogConfig) error
- func NewLegacyLogger(level slog.Level, prefix string) *log.Logger
- func SetLogFormat(format string)
- func Tracef(format string, v ...interface{})
- func Warnf(format string, v ...interface{})
Constants ¶
const ( ProgrammeName string = "gcsfuse" GCSFuseInBackgroundMode string = "GCSFUSE_IN_BACKGROUND_MODE" )
Syslog file contains logs from all different programmes running on the VM. ProgrammeName is prefixed to all the logs written to syslog. This constant is used to filter the logs from syslog and write it to respective log files - gcsfuse.log in case of GCSFuse.
const ( // LevelTrace value is set to -8, so that all the other log levels are logged. LevelTrace = slog.Level(-8) LevelDebug = slog.LevelDebug LevelInfo = slog.LevelInfo LevelWarn = slog.LevelWarn LevelError = slog.LevelError // LevelOff value is set to 12, so that nothing is logged. LevelOff = slog.Level(12) )
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf prints the message with DEBUG severity in the specified format.
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf prints the message with ERROR severity in the specified format.
func Fatal ¶
func Fatal(format string, v ...interface{})
Fatal prints an error log and exits with non-zero exit code.
func Infof ¶
func Infof(format string, v ...interface{})
Infof prints the message with INFO severity in the specified format.
func InitLogFile ¶
InitLogFile initializes the logger factory to create loggers that print to a log file. In case of empty file, it starts writing the log to syslog file, which is eventually filtered and redirected to a fixed location using syslog config. Here, background true means, this InitLogFile has been called for the background daemon.
func NewLegacyLogger ¶
NewLegacyLogger creates a new legacy logger. Avoid using this logger wherever possible and prioritise using the default logger methods like Infof(), Warnf(), Errorf(), etc present in logger package as this does not provide control to set log level for individual log messages. This method is created to support jacobsa/fuse loggers and will be removed after slog support is added.
func SetLogFormat ¶
func SetLogFormat(format string)
SetLogFormat updates the log format of default logger.
Types ¶
This section is empty.