From 499c9487263e788e1e48ec68f6418cc3ac5949cf Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Mon, 28 Mar 2016 22:20:03 -0500 Subject: [PATCH] (GH-181) log selection to log file only --- .../infrastructure/commandline/InteractivePrompt.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/chocolatey/infrastructure/commandline/InteractivePrompt.cs b/src/chocolatey/infrastructure/commandline/InteractivePrompt.cs index b137762d82..9bd83c9ced 100644 --- a/src/chocolatey/infrastructure/commandline/InteractivePrompt.cs +++ b/src/chocolatey/infrastructure/commandline/InteractivePrompt.cs @@ -114,6 +114,7 @@ public static string prompt_for_confirmation(string prompt, IEnumerable if (string.IsNullOrWhiteSpace(selection) && defaultChoice != null) { + "chocolatey".Log().Info(ChocolateyLoggers.LogFileOnly, "Choosing default choice of '{0}'".format_with(defaultChoice.escape_curly_braces())); return defaultChoice; } @@ -128,13 +129,14 @@ public static string prompt_for_confirmation(string prompt, IEnumerable { 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");