[PR #654] Involve foreground mode switch for up cmd #2820

Open
opened 2025-11-20 08:04:05 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/654

State: closed
Merged: Yes


Add new --foreground-mode command line parameter
for 'up' cmd instead of existing log-file workaround

Describe your changes

During debug the service, I am interested in output of the service. With this option it is easily configurable.
I tried to follow the current code style pattern, nevertheless I recommend to organize the content of the up.go into a new struct and register the upCmd into the cobra via a new function like this func registerUpCmd(rootCmd *cobra.Command). With it you can avoid global variables and init() functions.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/654 **State:** closed **Merged:** Yes --- Add new --foreground-mode command line parameter for 'up' cmd instead of existing log-file workaround ## Describe your changes During debug the service, I am interested in output of the service. With this option it is easily configurable. I tried to follow the current code style pattern, nevertheless I recommend to organize the content of the up.go into a new struct and register the upCmd into the cobra via a new function like this ```func registerUpCmd(rootCmd *cobra.Command)```. With it you can avoid global variables and ```init()``` functions. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2025-11-20 08:04:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2820