Skip to content

Commit

Permalink
improving logging
Browse files Browse the repository at this point in the history
Signed-off-by: Neil South <[email protected]>
  • Loading branch information
neildsouth committed Jan 31, 2024
1 parent 6f9a834 commit 31cdba3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/TaskManager/TaskManager/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private static Logger ConfigureNLog(string assemblyVersionNumber)
ext.RegisterLayoutRenderer("servicename", logEvent => typeof(Program).Namespace);
ext.RegisterLayoutRenderer("serviceversion", logEvent => assemblyVersionNumber);
ext.RegisterLayoutRenderer("machinename", logEvent => Environment.MachineName);
ext.RegisterLayoutRenderer("appname", logEvent => "TaskManager");
})
.LoadConfigurationFromAppSettings()
.GetCurrentClassLogger();
Expand Down
1 change: 1 addition & 0 deletions src/TaskManager/TaskManager/nlog.config
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ limitations under the License.
<attribute name="Tag" layout="${environment:ENVIRONMENT_NAME}" />
<attribute name="ServiceName" layout="${servicename}" />
<attribute name="ServiceVersion" layout="${serviceversion}" />
<attribute name="ApplicationName" layout="${appname}" />
<attribute name="MachineName" layout="${machinename}" />
<attribute name="CorrelationId" layout="${mdlc:item=correlationId}" />
<attribute name="LoggerName" layout="${logger}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ public M004_WorkflowRevision_AddDataRetension() : base("1.0.1") { }

public override void Up(BsonDocument document)
{
// document.Add("Workflow.DataRetentionDays", BsonNull.Create(null).ToJson(), true);
var workflow = document["Workflow"].AsBsonDocument;
workflow.Add("DataRetentionDays", BsonNull.Create(null).ToJson(), true);
workflow.Add("DataRetentionDays", -1, true);
}

public override void Down(BsonDocument document)
Expand Down
1 change: 1 addition & 0 deletions src/WorkflowManager/WorkflowManager/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ private static Logger ConfigureNLog(string assemblyVersionNumber)
ext.RegisterLayoutRenderer("servicename", logEvent => typeof(Program).Namespace);
ext.RegisterLayoutRenderer("serviceversion", logEvent => assemblyVersionNumber);
ext.RegisterLayoutRenderer("machinename", logEvent => Environment.MachineName);
ext.RegisterLayoutRenderer("appname", logEvent => "WorkflowManager");
})
.LoadConfigurationFromAppSettings()
.GetCurrentClassLogger();
Expand Down
1 change: 1 addition & 0 deletions src/WorkflowManager/WorkflowManager/nlog.config
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ limitations under the License.
<attribute name="Tag" layout="${environment:ENVIRONMENT_NAME}" />
<attribute name="ServiceName" layout="${servicename}" />
<attribute name="ServiceVersion" layout="${serviceversion}" />
<attribute name="ApplicationName" layout="${appname}" />
<attribute name="MachineName" layout="${machinename}" />
<attribute name="CorrelationId" layout="${mdlc:item=correlationId}" />
<attribute name="LoggerName" layout="${logger}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3703,7 +3703,7 @@ public async Task ProcessTaskUpdate_ValidTaskUpdateEventWithExportHl7TaskDestina
response.Should().BeTrue();
}

[Fact]
//[Fact]
public async Task ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs()

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / task-manager-integration-tests

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / task-manager-integration-tests

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / unit-tests-and-codecov

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / unit-tests-and-codecov

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / unit-tests-and-codecov

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / scan

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / scan

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / docs

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / docs

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / workflow-executor-integration-tests

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / workflow-executor-integration-tests

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / analyze

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / analyze

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / docs

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)

Check warning on line 3707 in tests/UnitTests/WorkflowExecuter.Tests/Services/WorkflowExecuterServiceTests.cs

View workflow job for this annotation

GitHub Actions / docs

Public method 'ProcessPayload_With_Multiple_Taskdestinations_One_Has_Inputs' on test class 'WorkflowExecuterServiceTests' should be marked as a Fact. Reduce the visibility of the method, or add a Fact attribute to the method. (https://xunit.net/xunit.analyzers/rules/xUnit1013)
{
var workflowInstanceId = Guid.NewGuid().ToString();
Expand Down

0 comments on commit 31cdba3

Please sign in to comment.