Skip to content

Instantly share code, notes, and snippets.

@tfaris
Created March 5, 2018 20:37
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 tfaris/f3619d8c92289a1715ee9ebe982b03f0 to your computer and use it in GitHub Desktop.
Save tfaris/f3619d8c92289a1715ee9ebe982b03f0 to your computer and use it in GitHub Desktop.
[ArmedXpert Plugin] Configure NLog to log inside of ArmedXpert by using NLog.Targets.ConsoleTarget
import clr
clr.AddReference("NLog")
import NLog
cfg = NLog.Config.LoggingConfiguration()
cfg.LoggingRules.Add(
NLog.Config.LoggingRule("*", NLog.LogLevel.Trace, NLog.Targets.ConsoleTarget())
)
NLog.LogManager.Configuration = cfg
NLog.LogManager.GetLogger(__name__).Error("Logging configured.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment