client: container: support CLI with entrypoint addition (#4126)
This will allow running netbird commands (including debugging) against the daemon and provide a flow similar to non-container usages. It will by default both log to file and stderr so it can be handled more uniformly in container-native environments.
This commit is contained in:
committed by
GitHub
parent
3f82698089
commit
af8687579b
@@ -30,7 +30,7 @@ var (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
_ = util.InitLog("debug", "console")
|
||||
_ = util.InitLog("debug", util.LogConsole)
|
||||
code := m.Run()
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
_ = util.InitLog("trace", "console")
|
||||
_ = util.InitLog("trace", util.LogConsole)
|
||||
cobraConfig = &Config{}
|
||||
rootCmd.PersistentFlags().StringVarP(&cobraConfig.ListenAddress, "listen-address", "l", ":443", "listen address")
|
||||
rootCmd.PersistentFlags().StringVarP(&cobraConfig.ExposedAddress, "exposed-address", "e", "", "instance domain address (or ip) and port, it will be distributes between peers")
|
||||
|
||||
@@ -27,7 +27,7 @@ var (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
_ = util.InitLog("error", "console")
|
||||
_ = util.InitLog("error", util.LogConsole)
|
||||
code := m.Run()
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ func TURNReaderMain() []testResult {
|
||||
func main() {
|
||||
var mode string
|
||||
|
||||
_ = util.InitLog("debug", "console")
|
||||
_ = util.InitLog("debug", util.LogConsole)
|
||||
flag.StringVar(&mode, "mode", "sender", "sender or receiver mode")
|
||||
flag.Parse()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user