Skip to content
Merged
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
2 changes: 1 addition & 1 deletion libtailscale/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func (a *App) newBackend(dataDir string, appCtx AppContext, store *stateStore,

netMon, err := netmon.New(b.bus, logf)
if err != nil {
log.Printf("netmon.New: %w", err)
log.Printf("netmon.New: %v", err)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%w is used for error wrapping and is only supported by fmt.Errorf.

}
b.netMon = netMon
b.setupLogs(dataDir, logID, logf, sys.HealthTracker.Get())
Expand Down
2 changes: 1 addition & 1 deletion libtailscale/tailscale.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (b *backend) setupLogs(logDir string, logID logid.PrivateID, logf logger.Lo
for {
select {
case logstr := <-onLog:
b.logger.Logf(logstr)
b.logger.Logf("%s", logstr)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid passing arbitrary strings as format strings as they may contain format specifiers.

}
}
}()
Expand Down
Loading