Created
March 5, 2018 20:37
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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