Skip to content

Commit

Permalink
[deco] added timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
DictumMortuum committed Oct 23, 2024
1 parent 788141a commit ab68529
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions cmd/servus-deco/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"log"
"strings"
"time"

"github.com/DictumMortuum/servus-extapi/pkg/config"
"github.com/DictumMortuum/servus-extapi/pkg/deco"
Expand Down Expand Up @@ -36,14 +37,18 @@ func printDevices(c *deco.Client) error {
}
}

now := time.Now()
sec := now.Unix()

fmt.Printf(
"client,deco,nickname,%s,ip,%s,mac,%s,type,%s,interface,%s=%d\n",
"client,deco,nickname,%s,ip,%s,mac,%s,type,%s,interface,%s,status,%d=%d\n",
nickname,
device.IP,
device.MAC,
device.ClientType,
device.Interface,
status)
status,
sec)
}

fmt.Printf("client_total,deco=%d\n", len(result.Result.ClientList))
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.0.39"
"version": "0.0.40"
}

0 comments on commit ab68529

Please sign in to comment.