当前位置: 首页>>代码示例>>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;未经允许,请勿转载。