Skip to content

Commit b7ae0b2

Browse files
Cleanup workspace daemon
1 parent 3ae65f9 commit b7ae0b2

File tree

3 files changed

+37
-110
lines changed

3 files changed

+37
-110
lines changed

pkg/daemon/workspace/daemon.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"github.com/spf13/cobra"
1919
)
2020

21-
// RootDir is the directory used by the daemon.
2221
const (
22+
// RootDir is the directory used by the daemon.
2323
RootDir = "/var/devpod"
2424
WorkspaceDaemonConfigExtraEnvVar = "DEVPOD_WORKSPACE_DAEMON_CONFIG"
2525
)
@@ -121,7 +121,6 @@ func (d *Daemon) Run(c *cobra.Command, args []string) error {
121121
}
122122

123123
// loadConfig loads the daemon configuration from base64-encoded JSON.
124-
// If a CLI-provided timeout exists, it overrides the timeout in the config.
125124
func (d *Daemon) loadConfig() error {
126125
if encodedCfg := os.Getenv(WorkspaceDaemonConfigExtraEnvVar); strings.TrimSpace(encodedCfg) != "" {
127126
decoded, err := base64.StdEncoding.DecodeString(encodedCfg)

pkg/daemon/workspace/network.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func RunNetworkServer(ctx context.Context, d *Daemon, errChan chan<- error, wg *
2020
errChan <- err
2121
return
2222
}
23-
logger := initLogging()
23+
logger := log.NewStdoutLogger(nil, os.Stdout, os.Stderr, logrus.InfoLevel)
2424
config := client.NewConfig()
2525
config.AccessKey = d.Config.Platform.AccessKey
2626
config.Host = "https://" + d.Config.Platform.PlatformHost
@@ -44,7 +44,3 @@ func RunNetworkServer(ctx context.Context, d *Daemon, errChan chan<- error, wg *
4444
errChan <- fmt.Errorf("network server: %w", err)
4545
}
4646
}
47-
48-
func initLogging() log.Logger {
49-
return log.NewStdoutLogger(nil, os.Stdout, os.Stderr, logrus.InfoLevel)
50-
}

0 commit comments

Comments
 (0)