Add Verbose log level between Info and Debug
Implemented full log level hierarchy: Fatal, Error, Warn, Info, Verbose, Debug. - Verbose level (-v) shows detailed operations like file changes (M/A/D) - Debug level (-vv) shows low-level tracing with caller info - Quiet mode (-q) sets level to Error, suppressing Info messages - Banner and summary output now use log levels for filtering
This commit is contained in:
@@ -125,17 +125,15 @@ func (mfa *CLIApp) fetchManifestOperation(ctx *cli.Context) error {
|
||||
close(progress)
|
||||
<-done
|
||||
|
||||
// Print summary if not quiet
|
||||
if !ctx.Bool("quiet") {
|
||||
elapsed := time.Since(startTime)
|
||||
avgBytesPerSec := float64(totalBytes) / elapsed.Seconds()
|
||||
avgRate := formatBitrate(avgBytesPerSec * 8)
|
||||
log.Infof("downloaded %d files (%.1f MB) in %.1fs (%s avg)",
|
||||
len(files),
|
||||
float64(totalBytes)/1e6,
|
||||
elapsed.Seconds(),
|
||||
avgRate)
|
||||
}
|
||||
// Print summary
|
||||
elapsed := time.Since(startTime)
|
||||
avgBytesPerSec := float64(totalBytes) / elapsed.Seconds()
|
||||
avgRate := formatBitrate(avgBytesPerSec * 8)
|
||||
log.Infof("downloaded %d files (%.1f MB) in %.1fs (%s avg)",
|
||||
len(files),
|
||||
float64(totalBytes)/1e6,
|
||||
elapsed.Seconds(),
|
||||
avgRate)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user