本文整理匯總了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()}
};
}