feat(portforward): log subcommands outputs with "up/down command:" prefix

This commit is contained in:
Quentin McGaw
2026-07-31 00:27:40 +00:00
parent b00279bc61
commit ab09534a84
3 changed files with 31 additions and 2 deletions
+5 -1
View File
@@ -133,7 +133,11 @@ func (s *Service) onNewPorts(ctx context.Context, internalToExternalPorts map[ui
copy(s.ports, externalPorts)
if s.settings.UpCommand != "" {
err = runCommand(ctx, s.cmder, s.logger, s.settings.UpCommand, externalPorts, s.settings.Interface)
logger := &loggerWithPrefix{
prefix: "up command: ",
logger: s.logger,
}
err = runCommand(ctx, s.cmder, logger, s.settings.UpCommand, externalPorts, s.settings.Interface)
if err != nil {
err = fmt.Errorf("running up command: %w", err)
s.logger.Error(err.Error())