The Null Logger class. This is useful for implementations where you need to provide a logger to a utility class, but do not want any output from it. It also helps when you have a utility that does not have a logger to supply.
Inheritance: IExtendedLogger
コード例 #1
0
		public MozillaOnlyFilter()
		{
			Log = new NullLogger();
			Enabled = true;
			Redirect = true;

			RedirectController = "home";
			RedirectAction = "mozilla";

			MinGeckoRelease = DefaultMinimumGeckoRelease;
		}
コード例 #2
0
ファイル: ManagerClassTest.cs プロジェクト: Lest16/Cashpoint
 public string Start(string testString)
 {
     var ms1 = new MemoryStream(Encoding.Default.GetBytes(testString));
     var sr = new StreamReader(ms1);
     var ms2 = new MemoryStream();
     var sw = new StreamWriter(ms2);
     ILogger logger = new NullLogger();
     var target = new Manager(
         new Cashpoint(true, new Dictionary<uint, uint>(), logger),
         new StubRepository<CashpointState>(),
         sr,
         sw,
         false);
     target.Start();
     var byffer = ms2.GetBuffer();
     var outputString = Encoding.Default.GetString(byffer);
     return outputString;
 }
コード例 #3
0
ファイル: BaseController.cs プロジェクト: DevlinLiles/Herald
 public BaseController()
 {
     Logger = new NullLogger();
 }