mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-01-08 05:52:10 +07:00
ditatompel
46bc3dc2e8
The log level for the apps is using `log/slog` from Go standard library. This commit change log format for fiber http logger to match with the slog standard log format (date and time). This commit also remove `APP_DEBUG` field from config struct. TODO: Use `slog` for default app output. Note that in this commit, the `slog` output only implemented in `cron` "db migrate" and probe client.
27 lines
334 B
Go
27 lines
334 B
Go
package cmd
|
|
|
|
import (
|
|
"os"
|
|
"xmr-remote-nodes/internal/config"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
const AppVer = "0.0.1"
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "xmr-nodes",
|
|
Short: "XMR Nodes",
|
|
Version: AppVer,
|
|
}
|
|
|
|
func Execute() {
|
|
err := rootCmd.Execute()
|
|
if err != nil {
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func init() {
|
|
config.LoadAll(".env")
|
|
}
|