diff --git a/src/Serilog.Sinks.Console/ConsoleLoggerConfigurationExtensions.cs b/src/Serilog.Sinks.Console/ConsoleLoggerConfigurationExtensions.cs deleted file mode 100644 index 12d2c1480..000000000 --- a/src/Serilog.Sinks.Console/ConsoleLoggerConfigurationExtensions.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using Serilog.Configuration; -using Serilog.Core; -using Serilog.Events; -using Serilog.Formatting.Display; -using Serilog.Sinks.SystemConsole; - -namespace Serilog -{ - public static class ConsoleLoggerConfigurationExtensions - { - const string DefaultConsoleOutputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level}] {Message}{NewLine}{Exception}"; - - /// - /// Writes log events to . - /// - /// Logger sink configuration. - /// The minimum level for - /// events passed through the sink. Ignored when is specified. - /// A switch allowing the pass-through minimum level - /// to be changed at runtime. - /// A message template describing the format used to write to the sink. - /// the default is "{Timestamp} [{Level}] {Message}{NewLine}{Exception}". - /// Supplies culture-specific formatting information, or null. - /// Configuration object allowing method chaining. - public static LoggerConfiguration Console( - this LoggerSinkConfiguration sinkConfiguration, - LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum, - string outputTemplate = DefaultConsoleOutputTemplate, - IFormatProvider formatProvider = null, - LoggingLevelSwitch levelSwitch = null) - { - if (sinkConfiguration == null) throw new ArgumentNullException(nameof(sinkConfiguration)); - if (outputTemplate == null) throw new ArgumentNullException(nameof(outputTemplate)); - var formatter = new MessageTemplateTextFormatter(outputTemplate, formatProvider); - return sinkConfiguration.Sink(new ConsoleSink(formatter), restrictedToMinimumLevel, levelSwitch); - } - } -} \ No newline at end of file diff --git a/src/Serilog.Sinks.Console/Properties/AssemblyInfo.cs b/src/Serilog.Sinks.Console/Properties/AssemblyInfo.cs deleted file mode 100644 index 1237c0e24..000000000 --- a/src/Serilog.Sinks.Console/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyVersion("2.0.0.0")] - -[assembly: CLSCompliant(true)] - -[assembly: InternalsVisibleTo("Serilog.Tests, PublicKey=" + - "0024000004800000940000000602000000240000525341310004000001000100fb8d13fd344a1c" + - "6fe0fe83ef33c1080bf30690765bc6eb0df26ebfdf8f21670c64265b30db09f73a0dea5b3db4c9" + - "d18dbf6d5a25af5ce9016f281014d79dc3b4201ac646c451830fc7e61a2dfd633d34c39f87b818" + - "94191652df5ac63cc40c77f3542f702bda692e6e8a9158353df189007a49da0f3cfd55eb250066" + - "b19485ec")] diff --git a/src/Serilog.Sinks.Console/Serilog.Sinks.Console.xproj b/src/Serilog.Sinks.Console/Serilog.Sinks.Console.xproj deleted file mode 100644 index 9417ec07a..000000000 --- a/src/Serilog.Sinks.Console/Serilog.Sinks.Console.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 866a028e-27db-49a0-ac78-e5fef247c099 - Serilog - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ - - - 2.0 - - - \ No newline at end of file diff --git a/src/Serilog.Sinks.Console/Sinks/Console/ConsoleSink.cs b/src/Serilog.Sinks.Console/Sinks/Console/ConsoleSink.cs deleted file mode 100644 index 02f9eb89c..000000000 --- a/src/Serilog.Sinks.Console/Sinks/Console/ConsoleSink.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2013-2016 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.IO; -using Serilog.Core; -using Serilog.Events; -using Serilog.Formatting; - -namespace Serilog.Sinks.SystemConsole -{ - class ConsoleSink : ILogEventSink - { - readonly ITextFormatter _textFormatter; - - public ConsoleSink(ITextFormatter textFormatter) - { - if (textFormatter == null) throw new ArgumentNullException(nameof(textFormatter)); - _textFormatter = textFormatter; - } - - public void Emit(LogEvent logEvent) - { - if (logEvent == null) throw new ArgumentNullException(nameof(logEvent)); - var renderSpace = new StringWriter(); - _textFormatter.Format(logEvent, renderSpace); - Console.Out.Write(renderSpace.ToString()); - } - } -} diff --git a/src/Serilog.Sinks.Console/project.json b/src/Serilog.Sinks.Console/project.json deleted file mode 100644 index 7ed4f0806..000000000 --- a/src/Serilog.Sinks.Console/project.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "version": "2.0.0-beta-*", - "description": "The console sink for Serilog.", - "authors": [ "Serilog Contributors" ], - "tags": [ "serilog", "console" ], - "projectUrl": "http://serilog.net", - "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0", - "iconUrl": "http://serilog.net/images/serilog-sink-nuget.png", - "dependencies": { - "Serilog": { "target": "project" } - }, - "compilationOptions": { - "keyFile": "../../assets/Serilog.snk" - }, - "frameworks": { - "net45": { - }, - "dotnet5.1": { - "dependencies": { - "System.Console": "4.0.0-beta-23516" - } - } - } -} \ No newline at end of file diff --git a/test/Serilog.Tests/project.json b/test/Serilog.Tests/project.json index 2240c6460..54899f98c 100644 --- a/test/Serilog.Tests/project.json +++ b/test/Serilog.Tests/project.json @@ -10,8 +10,7 @@ "Serilog": { "target": "project" }, "xunit": "2.1.0", "xunit.runner.visualstudio": "2.1.0", - "xunit.runner.dnx": "2.1.0-rc1-build204", - "Serilog.Sinks.Console": { "target": "project" }, + "xunit.runner.dnx": "2.1.0-rc1-build204", "Serilog.Sinks.Trace": { "target": "project" }, "Serilog.Sinks.File": { "target": "project" }, "Serilog.Sinks.RollingFile": { "target": "project" },