Skip to content

Commit

Permalink
adding logs when plugin fails to start. #222
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvam committed Oct 8, 2015
1 parent b3ef864 commit 57cc4fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func setCurrentProjectEnvVariable() error {
func convertToTime(value string, defaultValue time.Duration, name string) time.Duration {
intValue, err := strconv.Atoi(value)
if err != nil {
apiLog.Warning("Incorrect value for %s in property file.Cannot convert %s to time", name, value)
apiLog.Warning("Incorrect value for %s in property file. Cannot convert %s to time", name, value)
return defaultValue
}
return time.Millisecond * time.Duration(intValue)
Expand All @@ -118,6 +118,7 @@ func convertToTime(value string, defaultValue time.Duration, name string) time.D
var getFromConfig = func(propertyName string) string {
config, err := common.GetGaugeConfiguration()
if err != nil {
apiLog.Warning("Failed to get configuration from Gauge properties file. Error: %s", err.Error())
return ""
}
return config[propertyName]
Expand Down
6 changes: 5 additions & 1 deletion plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ func startPluginsForExecution(manifest *manifest.Manifest) (*PluginHandler, []st
continue
}
envProperties[pluginConnectionPortEnv] = strconv.Itoa(gaugeConnectionHandler.ConnectionPortNumber())
SetEnvForPlugin(executionScope, pd, manifest, envProperties)
err = SetEnvForPlugin(executionScope, pd, manifest, envProperties)
if err != nil {
warnings = append(warnings, fmt.Sprintf("Error setting environment for plugin %s %s. %s", pd.Name, pd.Version, err.Error()))
continue
}

pluginCmd, err := StartPlugin(pd, executionScope, false)
if err != nil {
Expand Down

0 comments on commit 57cc4fd

Please sign in to comment.