Skip to content

Commit

Permalink
more debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
slntopp committed Dec 13, 2024
1 parent 37d21d2 commit ae3336b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/os/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"regexp"
"time"

"github.com/rs/zerolog/log"
"github.com/spf13/afero"
)

Expand Down Expand Up @@ -53,6 +54,7 @@ func (t *MountedFs) MkdirAll(path string, perm os.FileMode) error {

func (t *MountedFs) Open(name string) (afero.File, error) {
mountedPath := t.getPath(name)
log.Debug().Str("mountedPath", mountedPath).Str("requestedPath", name).Msg("opening file") // debug
f, e := os.Open(mountedPath)
if f == nil {
// while this looks strange, we need to return a bare nil (of type nil) not
Expand Down
1 change: 1 addition & 0 deletions providers/os/id/sshhostkey/sshhostkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func Detect(t shared.Connection, p *inventory.Platform) ([]string, error) {
log.Warn().Err(err).Str("hostkey", hostKeyFilePath).Msg("no permission to access ssh hostkey")
continue
} else if os.IsNotExist(err) {
log.Debug().Str("hostkey", hostKeyFilePath).Msg("ssh hostkey not found") // debug
continue
} else if err != nil {
return nil, errors.Wrap(err, "could not read file:"+hostKeyFilePath)
Expand Down

0 comments on commit ae3336b

Please sign in to comment.