Skip to content

Instantly share code, notes, and snippets.

@kmorcinek
Created December 11, 2017 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmorcinek/76d750ac8e3beb55f39aef31256d5a57 to your computer and use it in GitHub Desktop.
Save kmorcinek/76d750ac8e3beb55f39aef31256d5a57 to your computer and use it in GitHub Desktop.
public class SettingsLogger
{
public static void LogSettings(
string inventoryPath,
AbcServiceSettings abcServiceSettings)
{
string userName = UserNameService.GetUserName();
var settings = new
{
inventoryPath,
userName,
abcServiceSettings
};
string serializedSettings = JsonConvert.SerializeObject(settings);
Logger.Info(serializedSettings);
}
}
public class AbcServiceSettings
{
public string Url { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment