コード例 #1
0
        public void EA_FileOpen(EAAPI.Repository repository)
        {
            EaPluginNlogConfigurator.InitializePluginLogging(repository, "SpecIF");

            _mainViewModel = new MainViewModel(repository);

            repository.CreateOutputTab("SpecIF");
            repository.EnsureOutputVisible("SpecIF");
        }
コード例 #2
0
        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);
        }