File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import (
19
19
"fmt"
20
20
"os"
21
21
22
- _ "go.uber.org/automaxprocs"
22
+ "go.uber.org/automaxprocs/maxprocs "
23
23
24
24
"github.com/blinklabs-io/tx-submit-api-mirror/api"
25
25
"github.com/blinklabs-io/tx-submit-api-mirror/config"
@@ -30,6 +30,10 @@ var cmdlineFlags struct {
30
30
configFile string
31
31
}
32
32
33
+ func logPrintf (format string , v ... any ) {
34
+ logging .GetLogger ().Infof (format , v ... )
35
+ }
36
+
33
37
func main () {
34
38
flag .StringVar (
35
39
& cmdlineFlags .configFile ,
@@ -58,6 +62,14 @@ func main() {
58
62
}
59
63
}()
60
64
65
+ // Configure max processes with our logger wrapper, toss undo func
66
+ _ , err = maxprocs .Set (maxprocs .Logger (logPrintf ))
67
+ if err != nil {
68
+ // If we hit this, something really wrong happened
69
+ logger .Errorf (err .Error ())
70
+ os .Exit (1 )
71
+ }
72
+
61
73
// Start API listener
62
74
logger .Infof (
63
75
"starting API listener on %s:%d" ,
You can’t perform that action at this time.
0 commit comments