public void EA_FileOpen(EAAPI.Repository repository) { EaPluginNlogConfigurator.InitializePluginLogging(repository, "SpecIF"); _mainViewModel = new MainViewModel(repository); repository.CreateOutputTab("SpecIF"); repository.EnsureOutputVisible("SpecIF"); }
public static void InitializePluginLogging(EAAPI.Repository repository, string logTabName = "System") { LoggingConfiguration loggingConfig = new LoggingConfiguration(); EaPluginNlogTarget eaPluginNlogTarget = new EaPluginNlogTarget(repository, logTabName); loggingConfig.AddTarget(eaPluginNlogTarget); loggingConfig.AddRuleForAllLevels(eaPluginNlogTarget); LogManager.Configuration = loggingConfig; repository.EnsureOutputVisible(logTabName); }