Skip to content

Instantly share code, notes, and snippets.

@ramonsmits
Created April 16, 2018 12:36
Show Gist options
  • Select an option

  • Save ramonsmits/d194572ce992c48aa000aee86eb4a66d to your computer and use it in GitHub Desktop.

Select an option

Save ramonsmits/d194572ce992c48aa000aee86eb4a66d to your computer and use it in GitHub Desktop.
NLog code api async
var config = new LoggingConfiguration();
var console = new ColoredConsoleTarget();
var async = new AsyncTargetWrapper(console);
config.AddTarget("console", wrapper);
config.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, async));
config.DefaultCultureInfo = CultureInfo.InvariantCulture;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment