Skip to content

Instantly share code, notes, and snippets.

@yosiat
Created July 3, 2016 09:49
Show Gist options
  • Save yosiat/3f98e98ccc586f1ef58a2a23858dd0ee to your computer and use it in GitHub Desktop.
Save yosiat/3f98e98ccc586f1ef58a2a23858dd0ee to your computer and use it in GitHub Desktop.
class Worker {
private readonly ILog mLogger = Log.ForContext<Worker>();
public void Process(string messageId) {
var messageLogger = mLogger.ForContext("messageId", messageId);
messageLogger.Information("Starting to process {messageId} with {SomeVariable}", 12)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment