Skip to content

Commit

Permalink
Log found files and loaded devices at debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbitter committed Dec 9, 2019
1 parent 4c89f9a commit 3effed4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
loglevel: debug
web:
externalAddress: "http://10.0.0.200:8000"
port: 8000
storage:
directory: "D:\\data\\"
wireguard:
userspaceImplementation: ""
interfaceName: wg0
privateKey: "yPAs0Pd1O14W/bAg0b2UwdXXRi9NIzCfprQywJTfQlQ="
externalAddress: "vpn.elzengaarde.nl:51820"
port: 51820
vpn:
cidr: "10.44.0.0/24"
gatewayInterface: ""
auth:
oidc:
name: "Elzengaarde"
issuer: "https://login.elzengaarde.nl/auth/realms/master"
clientID: "testvpn"
clientSecret: "69825c3b-da12-4587-a9e2-7ff85dbd53cb"
3 changes: 3 additions & 0 deletions internal/storage/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ func (s *DiskStorage) List(prefix string) ([]*Device, error) {
if err != nil {
return nil, errors.Wrap(err, "failed to list storage directory")
}
logrus.Debugf("Found files: %+v", files)

devices := []*Device{}
for _, file := range files {
bytes, err := ioutil.ReadFile(file)
Expand All @@ -73,6 +75,7 @@ func (s *DiskStorage) List(prefix string) ([]*Device, error) {
}
devices = append(devices, device)
}
logrus.Debugf("Found devices: %+v", devices)
return devices, nil
}

Expand Down

0 comments on commit 3effed4

Please sign in to comment.