當前位置: 首頁>>代碼示例>>C#>>正文


C# ILog.EnableServiceMessages方法代碼示例

本文整理匯總了C#中log4net.ILog.EnableServiceMessages方法的典型用法代碼示例。如果您正苦於以下問題:C# ILog.EnableServiceMessages方法的具體用法?C# ILog.EnableServiceMessages怎麽用?C# ILog.EnableServiceMessages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在log4net.ILog的用法示例。


在下文中一共展示了ILog.EnableServiceMessages方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ApiCommand

        protected ApiCommand(IOctopusRepositoryFactory repositoryFactory, ILog log)
        {
            this.repositoryFactory = repositoryFactory;
            this.log = log;

            var options = optionGroups.For("Common options");
            options.Add("server=", "The base URL for your Octopus server - e.g., http://your-octopus/", v => serverBaseUrl = v);
            options.Add("apiKey=", "Your API key. Get this from the user profile page.", v => apiKey = v);
            options.Add("user=", "[Optional] Username to use when authenticating with the server.", v => user = v);
            options.Add("pass=", "[Optional] Password to use when authenticating with the server.", v => pass = v);
            options.Add("configFile=", "[Optional] Text file of default values, with one 'key = value' per line.", v => ReadAdditionalInputsFromConfigurationFile(options, v));
            options.Add("debug", "[Optional] Enable debug logging", v => enableDebugging = true);
            options.Add("ignoreSslErrors", "[Optional] Set this flag if your Octopus server uses HTTPS but the certificate is not trusted on this machine. Any certificate errors will be ignored. WARNING: this option may create a security vulnerability.", v => ignoreSslErrors = true);
            options.Add("enableServiceMessages", "[Optional] Enable TeamCity service messages when logging.", v => log.EnableServiceMessages());
        }
開發者ID:james-wu,項目名稱:Octopus-Tools,代碼行數:15,代碼來源:ApiCommand.cs

示例2: OctopusSessionFactory

        public OctopusSessionFactory(ILog log, ICommandLineArgsProvider commandLineArgsProvider)
        {
            this.log = log;

            var options = new OptionSet();
            options.Add("server=", "The base URL for your Octopus server - e.g., http://myserver/", v => serverBaseUrl = v);
            options.Add("user=", "[Optional] Username to use when authenticating with the server.", v => user = v);
            options.Add("pass=", "[Optional] Password to use when authenticating with the server.", v => pass = v);
            options.Add("apiKey=", "Your API key.", v => apiKey = v);
            options.Add("configFile=", "[Optional] Text file of default values, with one 'key = value' per line.", v => configFile = v);
            options.Add("enableservicemessages", "Enable TeamCity service messages", v => log.EnableServiceMessages());

            options.Parse(commandLineArgsProvider.Args);

            SetDefaultValuesFromConfigFile();
        }
開發者ID:lisac,項目名稱:Octopus-Tools,代碼行數:16,代碼來源:OctopusSessionFactory.cs

示例3: ApiCommand

        protected ApiCommand(IOctopusSessionFactory client, ILog log)
        {
            this.client = client;
            this.log = log;

            options = new OptionSet
            {
                {"server=", "The base URL for your Octopus server - e.g., http://your-octopus/", v => serverBaseUrl = v},
                {"user=", "[Optional] Username to use when authenticating with the server.", v => user = v},
                {"pass=|password=", "[Optional] Password to use when authenticating with the server.", v => pass = v},
                {"apiKey=", "Your API key. Get this from the user profile page.", v => apiKey = v},
                {"configFile=", "[Optional] Text file of default values, with one 'key = value' per line.", v => ReadAdditionalInputsFromConfigurationFile(v)},
                {"debug", "[Optional] Enable debug logging", v => enableDebugging = true},
                {"ignoreSslErrors", "[Optional] Set this flag if your Octopus server uses HTTPS but the certificate is not trusted on this machine. Any certificate errors will be ignored. WARNING: this option may create a security vulnerability.", v => ignoreSslErrors = true},
                {"enableServiceMessages", "[Optional] Enable TeamCity service messages when logging.", v => log.EnableServiceMessages()}
            };
        }
開發者ID:richard-green,項目名稱:Octopus-Tools,代碼行數:17,代碼來源:ApiCommand.cs


注:本文中的log4net.ILog.EnableServiceMessages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。