// From https://github.com/serilog/serilog/blob/4736691b7a0cd574e178c24a61caa8a9196a6a61/src/Serilog/Core/Pipeline/SilentLogger.cs // Copyright 2013-2015 Serilog Contributors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using System; using System.Collections.Generic; using Serilog; using Serilog.Core; using Serilog.Events; namespace VocaluxeLib.Log.Serilog { class CSilentLogger : ILogger { public ILogger ForContext(ILogEventEnricher enricher) { return this; } public ILogger ForContext(IEnumerable enrichers) { return this; } public ILogger ForContext(string propertyName, object value, bool destructureObjects = false) { return this; } public ILogger ForContext() { return this; } public ILogger ForContext(Type source) { return this; } public void Write(LogEvent logEvent) { } public void Write(LogEventLevel level, string messageTemplate) { } public void Write(LogEventLevel level, string messageTemplate, T propertyValue) { } public void Write(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Write(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Write(LogEventLevel level, string messageTemplate, params object[] propertyValues) { } public void Write(LogEventLevel level, Exception exception, string messageTemplate) { } public void Write(LogEventLevel level, Exception exception, string messageTemplate, T propertyValue) { } public void Write(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Write(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Write(LogEventLevel level, Exception exception, string messageTemplate, params object[] propertyValues) { } public bool IsEnabled(LogEventLevel level) { return false; } public void Verbose(string messageTemplate) { } public void Verbose(string messageTemplate, T propertyValue) { } public void Verbose(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Verbose(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Verbose(string messageTemplate, params object[] propertyValues) { } public void Verbose(Exception exception, string messageTemplate) { } public void Verbose(Exception exception, string messageTemplate, T propertyValue) { } public void Verbose(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Verbose(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Verbose(Exception exception, string messageTemplate, params object[] propertyValues) { } public void Debug(string messageTemplate) { } public void Debug(string messageTemplate, T propertyValue) { } public void Debug(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Debug(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Debug(string messageTemplate, params object[] propertyValues) { } public void Debug(Exception exception, string messageTemplate) { } public void Debug(Exception exception, string messageTemplate, T propertyValue) { } public void Debug(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Debug(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Debug(Exception exception, string messageTemplate, params object[] propertyValues) { } public void Information(string messageTemplate) { } public void Information(string messageTemplate, T propertyValue) { } public void Information(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Information(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Information(string messageTemplate, params object[] propertyValues) { } public void Information(Exception exception, string messageTemplate) { } public void Information(Exception exception, string messageTemplate, T propertyValue) { } public void Information(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Information(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Information(Exception exception, string messageTemplate, params object[] propertyValues) { } public void Warning(string messageTemplate) { } public void Warning(string messageTemplate, T propertyValue) { } public void Warning(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Warning(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Warning(string messageTemplate, params object[] propertyValues) { } public void Warning(Exception exception, string messageTemplate) { } public void Warning(Exception exception, string messageTemplate, T propertyValue) { } public void Warning(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Warning(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Warning(Exception exception, string messageTemplate, params object[] propertyValues) { } public void Error(string messageTemplate) { } public void Error(string messageTemplate, T propertyValue) { } public void Error(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Error(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Error(string messageTemplate, params object[] propertyValues) { } public void Error(Exception exception, string messageTemplate) { } public void Error(Exception exception, string messageTemplate, T propertyValue) { } public void Error(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Error(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Error(Exception exception, string messageTemplate, params object[] propertyValues) { } public void Fatal(string messageTemplate) { } public void Fatal(string messageTemplate, T propertyValue) { } public void Fatal(string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Fatal(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Fatal(string messageTemplate, params object[] propertyValues) { } public void Fatal(Exception exception, string messageTemplate) { } public void Fatal(Exception exception, string messageTemplate, T propertyValue) { } public void Fatal(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) { } public void Fatal(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) { } public void Fatal(Exception exception, string messageTemplate, params object[] propertyValues) { } [MessageTemplateFormatMethod("messageTemplate")] public bool BindMessageTemplate(string messageTemplate, object[] propertyValues, out MessageTemplate parsedTemplate, out IEnumerable boundProperties) { parsedTemplate = null; boundProperties = null; return false; } public bool BindProperty(string propertyName, object value, bool destructureObjects, out LogEventProperty property) { property = null; return false; } } }