Skip to content

Commit

Permalink
(GH-181) log selection to log file only
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Mar 29, 2016
1 parent e14a982 commit 499c948
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public static string prompt_for_confirmation(string prompt, IEnumerable<string>

if (string.IsNullOrWhiteSpace(selection) && defaultChoice != null)
{
"chocolatey".Log().Info(ChocolateyLoggers.LogFileOnly, "Choosing default choice of '{0}'".format_with(defaultChoice.escape_curly_braces()));
return defaultChoice;
}

Expand All @@ -128,13 +129,14 @@ public static string prompt_for_confirmation(string prompt, IEnumerable<string>
{
selected = pair.Key;
selectionFound = true;
"chocolatey".Log().Info(ChocolateyLoggers.LogFileOnly, "Choice selected: '{0}'".format_with(pair.Value.escape_curly_braces()));
break;
}
}

if (!selectionFound)
{
"chocolatey".Log().Error(ChocolateyLoggers.Important, "Your choice of '{0}' is not a valid selection.".format_with(selection));
"chocolatey".Log().Error(ChocolateyLoggers.Important, "Your choice of '{0}' is not a valid selection.".format_with(selection.escape_curly_braces()));
if (requireAnswer)
{
"chocolatey".Log().Warn(ChocolateyLoggers.Important, "You must select an answer");
Expand Down

0 comments on commit 499c948

Please sign in to comment.