Skip to content

Instantly share code, notes, and snippets.

@sovanesyan
Last active August 29, 2015 14: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 sovanesyan/ec9d5b8743dde5d76ad2 to your computer and use it in GitHub Desktop.
Save sovanesyan/ec9d5b8743dde5d76ad2 to your computer and use it in GitHub Desktop.
var logger = new ILogger();
// Shortcut with just a message
logger.Error("Something bad happened");
// Shortcut for type
logger.Error(entry => entry.Message("Too many Cordova plugins used")
.Project("f24379a1-b53b-4b96-b383-a22397233b25", "My Big Hybrid App")
.User("f24379a1-b53b-4b96-b383-a22397233b25", "abuser@mtel.bg"));
// Which compiles to
logger.Log(new LogEntry(TraceLevel.Error).Message("Too many Cordova plugins used")
.Project("f24379a1-b53b-4b96-b383-a22397233b25", "My Big Hybrid App")
.User("f24379a1-b53b-4b96-b383-a22397233b25", "abuser@mtel.bg"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment