microsoft/TypeAgent
Publicmirrored fromhttps://github.com/microsoft/TypeAgentAvailable
dotnet/autoShell/Logging/NullLogger.cs
18lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System; |
| 5 | |
| 6 | namespace autoShell.Logging; |
| 7 | |
| 8 | /// <summary> |
| 9 | /// A no-op logger that discards all messages. Useful for tests and validation |
| 10 | /// where log output is not needed. |
| 11 | /// </summary> |
| 12 | internal class NullLogger : ILogger |
| 13 | { |
| 14 | public void Error(Exception ex) { } |
| 15 | public void Warning(string message) { } |
| 16 | public void Info(string message) { } |
| 17 | public void Debug(string message) { } |
| 18 | } |
| 19 | |