Skip to content

Commit

Permalink
add more details in error, fix logs in run -f
Browse files Browse the repository at this point in the history
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
  • Loading branch information
mukundansundar committed Jan 12, 2023
1 parent c09e685 commit 63afff6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ func executeRun(runFilePath string, apps []runfileconfig.App) (bool, error) {
}

func logInfomationalStatusToStdout(app runfileconfig.App) {
print.InfoStatusEvent(os.Stdout, "Started Dapr with app id %s. HTTP Port: %d. gRPC Port: %d",
print.InfoStatusEvent(os.Stdout, "Started Dapr with app id %q. HTTP Port: %d. gRPC Port: %d",
app.AppID, app.RunConfig.HTTPPort, app.RunConfig.GRPCPort)
print.InfoStatusEvent(os.Stdout, "Writing log files to directory : %s", app.GetLogsDir())
}
Expand Down Expand Up @@ -858,6 +858,6 @@ func putAppCommandInMeta(runConfig standalone.RunConfig, runState *runExec.RunEx
print.StatusEvent(runState.DaprCMD.OutputWriter, print.LogWarning, "Could not update sidecar metadata for appCommand: %s", err.Error())
return err
}
print.StatusEvent(runState.DaprCMD.OutputWriter, print.LogSuccess, "You're up and running! Both Dapr and your app logs will appear here.\n")
print.StatusEvent(runState.DaprCMD.OutputWriter, print.LogSuccess, "You're up and running! Dapr logs will appear here.\n")
return nil
}
4 changes: 2 additions & 2 deletions pkg/standalone/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ func (config *RunConfig) validateResourcesPath() error {
}
_, err := os.Stat(dirPath)
if err != nil {
return err
return fmt.Errorf("error validating resources path %q : %w", dirPath, err)
}
componentsLoader := components.NewStandaloneComponents(modes.StandaloneConfig{ComponentsPath: dirPath})
_, err = componentsLoader.LoadComponents()
if err != nil {
return err
return fmt.Errorf("error validating components in resources path %s : %w", dirPath, err)
}
return nil
}
Expand Down

0 comments on commit 63afff6

Please sign in to comment.