refactor: redesign logging system for CLI-friendly output (#561)

* refactor: redesign logging system for CLI-friendly output
* refactor: remove ANSI color support from logger
* fix: address PR review feedback
This commit is contained in:
Roger
2026-04-07 16:50:01 +08:00
committed by GitHub
parent a0b4412bf2
commit 5f42d4fe5f
13 changed files with 287 additions and 199 deletions
+2 -1
View File
@@ -58,6 +58,7 @@ func dumpCmd() *cobra.Command {
}
for _, b := range browsers {
log.Infof("Extracting %s/%s...", b.BrowserName(), b.ProfileName())
data, extractErr := b.Extract(categories)
if extractErr != nil {
log.Errorf("extract %s/%s: %v", b.BrowserName(), b.ProfileName(), extractErr)
@@ -73,7 +74,7 @@ func dumpCmd() *cobra.Command {
if err := fileutil.CompressDir(outputDir); err != nil {
return fmt.Errorf("compress: %w", err)
}
log.Warnf("compressed: %s/%s.zip", outputDir, filepath.Base(outputDir))
log.Infof("Compressed: %s/%s.zip", outputDir, filepath.Base(outputDir))
}
return nil
},