diff --git a/TeamCity.MSBuild.Logger/Composer.cs b/TeamCity.MSBuild.Logger/Composer.cs index 4c1af60..5c2946b 100644 --- a/TeamCity.MSBuild.Logger/Composer.cs +++ b/TeamCity.MSBuild.Logger/Composer.cs @@ -20,7 +20,7 @@ static Composer() .Bind().To() .Bind().To() .Bind().To() - .Bind().To() + .Bind().Bind().To() .Bind().To() .Bind().To() .Bind().To() diff --git a/TeamCity.MSBuild.Logger/DefaultConsole.cs b/TeamCity.MSBuild.Logger/DefaultConsole.cs index 72320fe..5918d93 100644 --- a/TeamCity.MSBuild.Logger/DefaultConsole.cs +++ b/TeamCity.MSBuild.Logger/DefaultConsole.cs @@ -6,7 +6,7 @@ using JetBrains.Annotations; // ReSharper disable once ClassNeverInstantiated.Global - internal class DefaultConsole : IConsole + internal class DefaultConsole : IConsole, IInitializable { [NotNull] private readonly IDiagnostics _diagnostics; [NotNull] private readonly TextWriter _out; @@ -19,6 +19,8 @@ public DefaultConsole([NotNull] IDiagnostics diagnostics) // https://youtrack.jetbrains.com/issue/TW-72330 _out = Console.Out; } + + public void Initialize() { } public void Write(string text) { diff --git a/TeamCity.MSBuild.Logger/IInitializable.cs b/TeamCity.MSBuild.Logger/IInitializable.cs new file mode 100644 index 0000000..8e35cd4 --- /dev/null +++ b/TeamCity.MSBuild.Logger/IInitializable.cs @@ -0,0 +1,8 @@ +namespace TeamCity.MSBuild.Logger +{ + // ReSharper disable once IdentifierTypo + interface IInitializable + { + void Initialize(); + } +} \ No newline at end of file diff --git a/TeamCity.MSBuild.Logger/NodeLogger.cs b/TeamCity.MSBuild.Logger/NodeLogger.cs index 95b1dc9..0f7ee13 100644 --- a/TeamCity.MSBuild.Logger/NodeLogger.cs +++ b/TeamCity.MSBuild.Logger/NodeLogger.cs @@ -34,6 +34,9 @@ internal class NodeLogger : INodeLogger private int _reentrancy; public NodeLogger( + // ReSharper disable once UnusedParameter.Local + // ReSharper disable once IdentifierTypo + [NotNull] IInitializable[] initializables, [NotNull] IParametersParser parametersParser, [NotNull] ILogWriter logWriter, [NotNull] ILoggerContext context,