Skip to content

Commit 0031fe4

Browse files
authored
Improved logging for conditional pipelines. (#204)
* Improved logging for conditional pipelines. * Updated dependencies.
1 parent 71e9635 commit 0031fe4

9 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/CodeCasa.AutomationPipelines.Lights/Pipeline/LightTransitionPipelineConfigurator.When.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ public ILightTransitionPipelineConfigurator<TLight> AddPipelineWhen<TObservable>
125125
if (instantiationScope == InstantiationScope.Shared)
126126
{
127127
// Note: even though InstantiationScope is primarily intended for composite pipelines, we try to stay consistent with the lifetime of the inner pipeline to avoid confusion.
128-
var pipeline = _serviceProvider.GetRequiredService<LightPipelineFactory>().CreateLightPipeline(Light, pipelineConfigurator.SetLoggingContext(LogName, LoggingEnabled ?? false));
128+
var pipeline = _serviceProvider.GetRequiredService<LightPipelineFactory>().CreateLightPipeline(Light, pipelineConfigurator.SetLoggingContext($"{LogName}->Condition", LoggingEnabled ?? false));
129129
return When<TObservable>(_ => pipeline);
130130
}
131-
return When<TObservable>(c =>
131+
return When<TObservable>(c =>
132132
c.GetRequiredService<LightPipelineFactory>()
133133
.CreateLightPipeline(c.GetRequiredService<TLight>(), pipelineConfigurator.SetLoggingContext(LogName, LoggingEnabled ?? false)));
134134
}
@@ -139,10 +139,10 @@ public ILightTransitionPipelineConfigurator<TLight> AddPipelineWhen(IObservable<
139139
if (instantiationScope == InstantiationScope.Shared)
140140
{
141141
// Note: even though InstantiationScope is primarily intended for composite pipelines, we try to stay consistent with the lifetime of the inner pipeline to avoid confusion.
142-
var pipeline = _serviceProvider.GetRequiredService<LightPipelineFactory>().CreateLightPipeline(Light, pipelineConfigurator.SetLoggingContext(LogName, LoggingEnabled ?? false));
142+
var pipeline = _serviceProvider.GetRequiredService<LightPipelineFactory>().CreateLightPipeline(Light, pipelineConfigurator.SetLoggingContext($"{LogName}->Condition", LoggingEnabled ?? false));
143143
return When(observable, _ => pipeline);
144144
}
145-
return When(observable, c =>
145+
return When(observable, c =>
146146
c.GetRequiredService<LightPipelineFactory>()
147147
.CreateLightPipeline(c.GetRequiredService<TLight>(), pipelineConfigurator.SetLoggingContext(LogName, LoggingEnabled ?? false)));
148148
}

src/CodeCasa.AutomationPipelines/CodeCasa.AutomationPipelines.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.2" />
38-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.2" />
37+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.3" />
38+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.3" />
3939
<PackageReference Include="System.Reactive" Version="6.1.0" />
4040
</ItemGroup>
4141

src/CodeCasa.NetDaemon.RuntimeState/CodeCasa.NetDaemon.RuntimeState.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.2" />
37+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.3" />
3838
<PackageReference Include="NetDaemon.Client" Version="26.3.0" />
3939
<PackageReference Include="NetDaemon.Runtime" Version="26.3.0" />
4040
</ItemGroup>

src/CodeCasa.Notifications.InputSelect.NetDaemon/CodeCasa.Notifications.InputSelect.NetDaemon.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.2" />
37+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.3" />
3838
</ItemGroup>
3939

4040
<ItemGroup>

tests/CodeCasa.AutomationPipelines.Lights.Tests/CodeCasa.AutomationPipelines.Lights.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="MSTest" Version="4.0.2" />
11+
<PackageReference Include="MSTest" Version="4.1.0" />
1212
<PackageReference Include="Moq" Version="4.20.72" />
1313
</ItemGroup>
1414

tests/CodeCasa.AutomationPipelines.Tests/CodeCasa.AutomationPipelines.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="MSTest" Version="4.0.2" />
11+
<PackageReference Include="MSTest" Version="4.1.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

tests/CodeCasa.Lights.Tests/CodeCasa.Lights.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="MSTest" Version="4.0.2" />
11+
<PackageReference Include="MSTest" Version="4.1.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

tests/CodeCasa.NetDaemon.Extensions.Observables.Tests/CodeCasa.NetDaemon.Extensions.Observables.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.Reactive.Testing" Version="6.1.0" />
1212
<PackageReference Include="Moq" Version="4.20.72" />
13-
<PackageReference Include="MSTest" Version="4.0.2" />
13+
<PackageReference Include="MSTest" Version="4.1.0" />
1414
<PackageReference Include="System.Reactive" Version="6.1.0" />
1515
</ItemGroup>
1616

tests/CodeCasa.Notifications.InputSelect.NetDaemon.Tests/CodeCasa.Notifications.InputSelect.NetDaemon.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="MSTest" Version="4.0.2" />
11+
<PackageReference Include="MSTest" Version="4.1.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

0 commit comments

Comments
 (0)