Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adb/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (c *Collector) Find(path string) ([]FileInfo, error) {
if !c.isInstalled() {
err := c.Install()
if err != nil {
log.Debugf("Impossible to install collector: %w", err)
log.Debugf("Impossible to install collector: %v", err)
return results, err
}
}
Expand All @@ -175,7 +175,7 @@ func (c *Collector) FindHash(path string) ([]FileInfo, error) {
if !c.isInstalled() {
err := c.Install()
if err != nil {
log.Debugf("Impossible to install collector: %w", err)
log.Debugf("Impossible to install collector: %v", err)
return results, err
}
}
Expand All @@ -200,7 +200,7 @@ func (c *Collector) Processes() ([]ProcessInfo, error) {
if c.isInstalled() {
err := c.Install()
if err != nil {
log.Debugf("Impossible to install collector: %w", err)
log.Debugf("Impossible to install collector: %v", err)
return results, err
}
}
Expand Down
12 changes: 6 additions & 6 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,31 +206,31 @@ func CloseFileLog() {
}

func Debug(v ...any) {
log.out(DEBUG, "", v...)
log.out(DEBUG, "%s", fmt.Sprint(v...))
}

func Debugf(format string, v ...any) {
log.out(DEBUG, format, v...)
}

func Info(v ...any) {
log.out(INFO, "", v...)
log.out(INFO, "%s", fmt.Sprint(v...))
}

func Infof(format string, v ...any) {
log.out(INFO, format, v...)
}

func Warning(v ...any) {
log.out(WARNING, "", v...)
log.out(WARNING, "%s", fmt.Sprint(v...))
}

func Warningf(format string, v ...any) {
log.out(WARNING, format, v...)
}

func Error(v ...any) {
log.out(ERROR, "", v...)
log.out(ERROR, "%s", fmt.Sprint(v...))
}

func Errorf(format string, v ...any) {
Expand All @@ -242,15 +242,15 @@ func ErrorExc(desc string, err error) {
}

func Critical(v ...any) {
log.out(CRITICAL, "", v...)
log.out(CRITICAL, "%s", fmt.Sprint(v...))
}

func Criticalf(format string, v ...any) {
log.out(CRITICAL, format, v...)
}

func Fatal(v ...any) {
log.out(FATAL, "", v...)
log.out(FATAL, "%s", fmt.Sprint(v...))
os.Exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion modules/bugreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (b *Bugreport) Run(acq *acquisition.Acquisition, fast bool) error {
bugreportPath := filepath.Join(b.StoragePath, "bugreport.zip")
err := adb.Client.Bugreport(bugreportPath)
if err != nil {
log.Debugf("Impossible to generate bugreport: %w", err)
log.Debugf("Impossible to generate bugreport: %v", err)
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (l *Logs) Run(acq *acquisition.Acquisition, fast bool) error {
for _, logFolder := range []string{"/data/anr/", "/data/log/", "/sdcard/log/"} {
files, err := adb.Client.ListFiles(logFolder, true)
if err != nil {
log.Debugf("Impossible to get files from %", logFolder)
log.Debugf("Impossible to get files from %s", logFolder)
continue
}
if len(files) == 0 {
Expand Down
Loading