Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions source/Octopus.Manager.Tentacle/Octopus.Manager.Tentacle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,22 @@
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Common, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Common.3.6.0-octopus-58455\lib\net45\NuGet.Common.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NuGet.Common.3.6.0-octopus-58672\lib\net45\NuGet.Common.dll</HintPath>
</Reference>
<Reference Include="NuGet.Frameworks, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Frameworks.3.6.0-octopus-58455\lib\net45\NuGet.Frameworks.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NuGet.Frameworks.3.6.0-octopus-58672\lib\net45\NuGet.Frameworks.dll</HintPath>
</Reference>
<Reference Include="NuGet.Packaging, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.3.6.0-octopus-58455\lib\net45\NuGet.Packaging.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NuGet.Packaging.3.6.0-octopus-58672\lib\net45\NuGet.Packaging.dll</HintPath>
</Reference>
<Reference Include="NuGet.Packaging.Core, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.Core.3.6.0-octopus-58455\lib\net45\NuGet.Packaging.Core.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NuGet.Packaging.Core.3.6.0-octopus-58672\lib\net45\NuGet.Packaging.Core.dll</HintPath>
</Reference>
<Reference Include="NuGet.Packaging.Core.Types, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.Core.Types.3.6.0-octopus-58455\lib\net45\NuGet.Packaging.Core.Types.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NuGet.Packaging.Core.Types.3.6.0-octopus-58672\lib\net45\NuGet.Packaging.Core.Types.dll</HintPath>
</Reference>
<Reference Include="NuGet.Versioning, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Versioning.3.6.0-octopus-58455\lib\net45\NuGet.Versioning.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NuGet.Versioning.3.6.0-octopus-58672\lib\net45\NuGet.Versioning.dll</HintPath>
</Reference>
<Reference Include="Octopus.Client, Version=4.15.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Client.4.15.7\lib\net45\Octopus.Client.dll</HintPath>
Expand All @@ -126,11 +120,11 @@
<Reference Include="Octopus.Diagnostics, Version=1.0.12.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Diagnostics.1.0.12\lib\netstandard1.0\Octopus.Diagnostics.dll</HintPath>
</Reference>
<Reference Include="Octopus.Manager.Core, Version=3.14.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Manager.Core.3.14.0-ci0053\lib\Octopus.Manager.Core.dll</HintPath>
<Reference Include="Octopus.Manager.Core, Version=3.14.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Manager.Core.3.14.2-bug-noconsolelog0005\lib\Octopus.Manager.Core.dll</HintPath>
</Reference>
<Reference Include="Octopus.Shared, Version=3.14.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Shared.3.14.0-ci0053\lib\Octopus.Shared.dll</HintPath>
<Reference Include="Octopus.Shared, Version=3.14.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Shared.3.14.2-bug-noconsolelog0005\lib\Octopus.Shared.dll</HintPath>
</Reference>
<Reference Include="Octopus.Time, Version=1.0.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Time.1.0.9\lib\netstandard1.0\Octopus.Time.dll</HintPath>
Expand Down
16 changes: 8 additions & 8 deletions source/Octopus.Manager.Tentacle/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="Nito.AsyncEx" version="3.0.1" targetFramework="net45" />
<package id="NLog" version="4.0.1" targetFramework="net45" />
<package id="NuGet.Common" version="3.6.0-octopus-58455" targetFramework="net45" />
<package id="NuGet.Frameworks" version="3.6.0-octopus-58455" targetFramework="net45" />
<package id="NuGet.Packaging" version="3.6.0-octopus-58455" targetFramework="net45" />
<package id="NuGet.Packaging.Core" version="3.6.0-octopus-58455" targetFramework="net45" />
<package id="NuGet.Packaging.Core.Types" version="3.6.0-octopus-58455" targetFramework="net45" />
<package id="NuGet.Versioning" version="3.6.0-octopus-58455" targetFramework="net45" />
<package id="NuGet.Common" version="3.6.0-octopus-58672" targetFramework="net45" />
<package id="NuGet.Frameworks" version="3.6.0-octopus-58672" targetFramework="net45" />
<package id="NuGet.Packaging" version="3.6.0-octopus-58672" targetFramework="net45" />
<package id="NuGet.Packaging.Core" version="3.6.0-octopus-58672" targetFramework="net45" />
<package id="NuGet.Packaging.Core.Types" version="3.6.0-octopus-58672" targetFramework="net45" />
<package id="NuGet.Versioning" version="3.6.0-octopus-58672" targetFramework="net45" />
<package id="Octopus.Client" version="4.15.7" targetFramework="net45" />
<package id="Octopus.Configuration" version="1.0.11" targetFramework="net45" />
<package id="Octopus.Diagnostics" version="1.0.12" targetFramework="net45" />
<package id="Octopus.Manager.Core" version="3.14.0-ci0053" targetFramework="net45" />
<package id="Octopus.Shared" version="3.14.0-ci0053" targetFramework="net45" />
<package id="Octopus.Manager.Core" version="3.14.2-bug-noconsolelog0005" targetFramework="net45" />
<package id="Octopus.Shared" version="3.14.2-bug-noconsolelog0005" targetFramework="net45" />
<package id="Octopus.Time" version="1.0.9" targetFramework="net45" />
<package id="System.Net.Http" version="4.1.0" targetFramework="net45" />
<package id="System.Runtime" version="4.1.0" targetFramework="net45" />
Expand Down
9 changes: 9 additions & 0 deletions source/Octopus.Tentacle.Tests/Integration/ScriptLogFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void ShouldAppend()
var logs = log.GetOutput(long.MinValue, out next);
Assert.That(logs.Count, Is.EqualTo(2));
Assert.That(logs[0].Text, Is.EqualTo("Hello"));
Assert.That(logs[0].Source, Is.EqualTo(ProcessOutputSource.StdOut));
Assert.That(logs[1].Text, Is.EqualTo("World"));

appender.WriteOutput(ProcessOutputSource.StdOut, "More");
Expand All @@ -40,6 +41,14 @@ public void ShouldAppend()
Assert.That(logs.Count, Is.EqualTo(2));
Assert.That(logs[0].Text, Is.EqualTo("More"));
Assert.That(logs[1].Text, Is.EqualTo("Output"));

appender.WriteOutput(ProcessOutputSource.StdErr, "ErrorHappened");

logs = log.GetOutput(next, out next);
Assert.That(logs.Count, Is.EqualTo(1));
Assert.That(logs[0].Text, Is.EqualTo("ErrorHappened"));
Assert.That(logs[0].Source, Is.EqualTo(ProcessOutputSource.StdErr));

appender.Dispose();
}
finally
Expand Down
22 changes: 18 additions & 4 deletions source/Octopus.Tentacle.Tests/Octopus.Tentacle.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,23 @@
<HintPath>..\packages\NSubstitute.1.8.2.0\lib\net45\NSubstitute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Common, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Common.3.6.0-octopus-58672\lib\net45\NuGet.Common.dll</HintPath>
</Reference>
<Reference Include="NuGet.Frameworks, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Frameworks.3.6.0-octopus-58672\lib\net45\NuGet.Frameworks.dll</HintPath>
</Reference>
<Reference Include="NuGet.Packaging, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.3.6.0-octopus-58672\lib\net45\NuGet.Packaging.dll</HintPath>
</Reference>
<Reference Include="NuGet.Packaging.Core, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.Core.3.6.0-octopus-58672\lib\net45\NuGet.Packaging.Core.dll</HintPath>
</Reference>
<Reference Include="NuGet.Packaging.Core.Types, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.Core.Types.3.6.0-octopus-58672\lib\net45\NuGet.Packaging.Core.Types.dll</HintPath>
</Reference>
<Reference Include="NuGet.Versioning, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Versioning.3.6.0-octopus-58455\lib\net45\NuGet.Versioning.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\NuGet.Versioning.3.6.0-octopus-58672\lib\net45\NuGet.Versioning.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
Expand All @@ -124,8 +138,8 @@
<Reference Include="Octopus.Diagnostics, Version=1.0.12.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Diagnostics.1.0.12\lib\netstandard1.0\Octopus.Diagnostics.dll</HintPath>
</Reference>
<Reference Include="Octopus.Shared, Version=3.14.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Shared.3.14.0-ci0053\lib\Octopus.Shared.dll</HintPath>
<Reference Include="Octopus.Shared, Version=3.14.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Shared.3.14.2-bug-noconsolelog0005\lib\Octopus.Shared.dll</HintPath>
</Reference>
<Reference Include="Octopus.Time, Version=1.0.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Time.1.0.9\lib\netstandard1.0\Octopus.Time.dll</HintPath>
Expand Down
14 changes: 7 additions & 7 deletions source/Octopus.Tentacle.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@
<package id="Nito.AsyncEx" version="3.0.1" targetFramework="net452" />
<package id="NLog" version="4.0.1" targetFramework="net45" />
<package id="NSubstitute" version="1.8.2.0" targetFramework="net45" />
<package id="NuGet.Common" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Common" version="3.6.0-octopus-58672" targetFramework="net452" />
<package id="NuGet.Configuration" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Frameworks" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Packaging" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Packaging.Core" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Packaging.Core.Types" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Frameworks" version="3.6.0-octopus-58672" targetFramework="net452" />
<package id="NuGet.Packaging" version="3.6.0-octopus-58672" targetFramework="net452" />
<package id="NuGet.Packaging.Core" version="3.6.0-octopus-58672" targetFramework="net452" />
<package id="NuGet.Packaging.Core.Types" version="3.6.0-octopus-58672" targetFramework="net452" />
<package id="NuGet.Protocol.Core.Types" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Protocol.Core.v3" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Versioning" version="3.6.0-octopus-58455" targetFramework="net452" />
<package id="NuGet.Versioning" version="3.6.0-octopus-58672" targetFramework="net452" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="Octopus.Client" version="4.15.7" targetFramework="net452" />
<package id="Octopus.Configuration" version="1.0.11" targetFramework="net452" />
<package id="Octopus.Data" version="1.0.24" targetFramework="net452" />
<package id="Octopus.Diagnostics" version="1.0.12" targetFramework="net452" />
<package id="Octopus.Server.Extensibility" version="2.0.2" targetFramework="net452" />
<package id="Octopus.Server.Extensibility.Authentication" version="3.0.0" targetFramework="net452" />
<package id="Octopus.Shared" version="3.14.0-ci0053" targetFramework="net452" />
<package id="Octopus.Shared" version="3.14.2-bug-noconsolelog0005" targetFramework="net452" />
<package id="Octopus.Time" version="1.0.9" targetFramework="net452" />
<package id="Octostache" version="2.1.5" targetFramework="net452" />
<package id="Polly" version="5.1.0" targetFramework="net452" />
Expand Down
2 changes: 1 addition & 1 deletion source/Octopus.Tentacle/Octopus.Tentacle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ItemGroup>
<PackageReference Include="Autofac" Version="3.5.2" />
<PackageReference Include="Octopus.Client" Version="4.15.7" />
<PackageReference Include="Octopus.Shared" Version="3.14.0-ci0053" />
<PackageReference Include="Octopus.Shared" Version="3.14.2-ci0022" />
<PackageReference Include="System.Net.Http" Version="4.1.0" />
<PackageReference Include="Obsolete.Fody" Version="4.2.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
12 changes: 5 additions & 7 deletions source/Octopus.Tentacle/tentacle.exe.nlog
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<variable name="normalLayout" value="${longdate} ${threadid:padding=5} ${uppercase:${level}:padding=5} ${messageLayout}"/>

<targets async="false">
<target xsi:type="ColoredConsole" name="stdout" layout="${messageLayout}" />
<target xsi:type="ColoredConsole" name="stderr" errorStream="true" layout="${messageLayout}" />
<target name="octopus-log-file" xsi:type="File"
layout="${normalLayout}"
fileName="${octopusLogsDirectory}/OctopusTentacle.txt"
Expand All @@ -25,17 +27,13 @@
maxArchiveFiles="7"
concurrentWrites="true"
keepFileOpen="false" />

<target xsi:type="ColoredConsole" name="console" layout="${messageLayout}"/>
<target xsi:type="EventLog" name="eventlog" source="${appName}" layout="${normalLayout}" />
</targets>

<rules>
<logger name="SkipConsole" minlevel="Info" writeTo="octopus-log-file" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to these ones?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was an old way this feature was implemented back in the day, but I don't think it worked very well.

<logger name="SkipConsole" minlevel="Fatal" writeTo="eventlog" final="true" />

<logger name="*" minlevel="Info" maxLevel="Warn" writeTo="stdout" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit concerned this might be a breaking change... Say someone is just redirecting stdout to a file - all of a sudden it doesn't log errors anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, will update our 3.14 release notes and make it clear in the issue release note.

<logger name="*" minlevel="Error" writeTo="stderr" />
<logger name="*" minlevel="Info" writeTo="octopus-log-file" />
<logger name="*" minlevel="Fatal" writeTo="eventlog" />
<logger name="*" minlevel="Info" writeTo="console" />
</rules>
</rules>
</nlog>