Documentation
¶
Index ¶
- func Critical(format string, args ...interface{})
- func Debug(format string, args ...interface{})
- func Error(format string, args ...interface{})
- func Fatal(exitCode types.ExitCode, format string, args ...interface{})
- func Info(format string, args ...interface{})
- func SetDefaultLogger(logger *Logger)
- func Skip(format string, args ...interface{})
- func Step(format string, args ...interface{})
- func Warning(format string, args ...interface{})
- type BootstrapLogger
- func (b *BootstrapLogger) Debug(format string, args ...interface{})
- func (b *BootstrapLogger) Error(format string, args ...interface{})
- func (b *BootstrapLogger) Flush(logger *Logger)
- func (b *BootstrapLogger) Info(format string, args ...interface{})
- func (b *BootstrapLogger) Printf(format string, args ...interface{})
- func (b *BootstrapLogger) Println(message string)
- func (b *BootstrapLogger) SetLevel(level types.LogLevel)
- func (b *BootstrapLogger) SetMirrorLogger(logger *Logger)
- func (b *BootstrapLogger) Warning(format string, args ...interface{})
- type Logger
- func (l *Logger) CloseLogFile() error
- func (l *Logger) Critical(format string, args ...interface{})
- func (l *Logger) Debug(format string, args ...interface{})
- func (l *Logger) Error(format string, args ...interface{})
- func (l *Logger) Fatal(exitCode types.ExitCode, format string, args ...interface{})
- func (l *Logger) GetLevel() types.LogLevel
- func (l *Logger) GetLogFilePath() string
- func (l *Logger) HasErrors() bool
- func (l *Logger) HasWarnings() bool
- func (l *Logger) Info(format string, args ...interface{})
- func (l *Logger) OpenLogFile(logPath string) error
- func (l *Logger) Phase(format string, args ...interface{})
- func (l *Logger) SetExitFunc(fn func(int))
- func (l *Logger) SetLevel(level types.LogLevel)
- func (l *Logger) SetOutput(w io.Writer)
- func (l *Logger) Skip(format string, args ...interface{})
- func (l *Logger) Step(format string, args ...interface{})
- func (l *Logger) UsesColor() bool
- func (l *Logger) Warning(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Critical ¶
func Critical(format string, args ...interface{})
Critical scrive un log critico usando il logger di default
func Debug ¶
func Debug(format string, args ...interface{})
Debug scrive un log di debug usando il logger di default
func Error ¶
func Error(format string, args ...interface{})
Error scrive un log di errore usando il logger di default
func Info ¶
func Info(format string, args ...interface{})
Info scrive un log informativo usando il logger di default
func SetDefaultLogger ¶
func SetDefaultLogger(logger *Logger)
SetDefaultLogger imposta il logger di default
func Skip ¶
func Skip(format string, args ...interface{})
Skip scrive un log SKIP usando il logger di default
Types ¶
type BootstrapLogger ¶
type BootstrapLogger struct {
// contains filtered or unexported fields
}
BootstrapLogger accumula i log generati prima che il logger principale sia inizializzato, così da poterli riversare nel log finale.
func NewBootstrapLogger ¶
func NewBootstrapLogger() *BootstrapLogger
NewBootstrapLogger crea un nuovo bootstrap logger con livello INFO di default.
func (*BootstrapLogger) Debug ¶
func (b *BootstrapLogger) Debug(format string, args ...interface{})
Debug registra un messaggio di debug senza stamparlo a console.
func (*BootstrapLogger) Error ¶
func (b *BootstrapLogger) Error(format string, args ...interface{})
Error registra un messaggio di errore precoce (stderr).
func (*BootstrapLogger) Flush ¶
func (b *BootstrapLogger) Flush(logger *Logger)
Flush riversa le entry accumulate nel logger principale (solo la prima volta).
func (*BootstrapLogger) Info ¶
func (b *BootstrapLogger) Info(format string, args ...interface{})
Info registra un messaggio informativo precoce.
func (*BootstrapLogger) Printf ¶
func (b *BootstrapLogger) Printf(format string, args ...interface{})
Printf registra una riga formattata come raw.
func (*BootstrapLogger) Println ¶
func (b *BootstrapLogger) Println(message string)
Println registra una riga “raw” (usata per banner/testo senza header).
func (*BootstrapLogger) SetLevel ¶
func (b *BootstrapLogger) SetLevel(level types.LogLevel)
SetLevel aggiorna il livello minimo che verrà usato al flush.
func (*BootstrapLogger) SetMirrorLogger ¶
func (b *BootstrapLogger) SetMirrorLogger(logger *Logger)
SetMirrorLogger forwards every bootstrap message to the provided logger.
func (*BootstrapLogger) Warning ¶
func (b *BootstrapLogger) Warning(format string, args ...interface{})
Warning registra un messaggio di warning precoce (stampato su stderr).
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger gestisce il logging dell'applicazione
func GetDefaultLogger ¶
func GetDefaultLogger() *Logger
GetDefaultLogger restituisce il logger di default
func StartSessionLogger ¶
func StartSessionLogger(flow string, level types.LogLevel, useColor bool) (*Logger, string, func(), error)
StartSessionLogger creates a new logger instance that writes to a real-time log file under /tmp/proxsave. The caller receives the configured logger, the absolute log path, and a cleanup function that must be invoked when the session completes.
func (*Logger) CloseLogFile ¶
CloseLogFile chiude il file di log (da chiamare dopo le notifiche)
func (*Logger) GetLogFilePath ¶
GetLogFilePath restituisce il path del file di log attualmente aperto (o "" se nessuno)
func (*Logger) HasErrors ¶
HasErrors returns true if at least one error or critical message was logged.
func (*Logger) HasWarnings ¶
HasWarnings returns true if at least one warning was logged.
func (*Logger) OpenLogFile ¶
OpenLogFile apre un file di log e inizia la scrittura real-time
func (*Logger) SetExitFunc ¶
SetExitFunc allows customizing the exit function (useful for tests). If fn is nil, it restores os.Exit.
func (*Logger) Skip ¶
Skip scrive un log informativo con etichetta SKIP (per elementi disabilitati/ignorati)
func (*Logger) Step ¶
Step scrive un log informativo con etichetta STEP (per evidenziare attività sequenziali)