本文整理汇总了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());
}
示例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();
}
示例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()}
};
}