-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Annotated Recording message templates
- Loading branch information
1 parent
68827b1
commit a2f0bed
Showing
9 changed files
with
89 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
using JetBrains.Annotations; | ||
|
||
namespace Common.Recording; | ||
|
||
/// <summary> | ||
/// Records permanent audit events in the system | ||
/// </summary> | ||
public interface IAuditReporter | ||
{ | ||
void Audit(ICallContext? context, string againstId, string auditCode, string messageTemplate, | ||
void Audit(ICallContext? context, string againstId, string auditCode, | ||
[StructuredMessageTemplate] string messageTemplate, | ||
params object[] templateArgs); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
using JetBrains.Annotations; | ||
|
||
namespace Common.Recording; | ||
|
||
/// <summary> | ||
/// Records crash events in the system | ||
/// </summary> | ||
public interface ICrashReporter | ||
{ | ||
void Crash(ICallContext? context, CrashLevel level, Exception exception, string messageTemplate, | ||
void Crash(ICallContext? context, CrashLevel level, Exception exception, | ||
[StructuredMessageTemplate] string messageTemplate, | ||
params object[] templateArgs); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using Common; | ||
using Common.Recording; | ||
using JetBrains.Annotations; | ||
|
||
namespace Infrastructure.Common.Recording; | ||
|
||
/// <summary> | ||
/// An <see cref="IAuditReporter" /> that does nothing | ||
/// </summary> | ||
[ExcludeFromCodeCoverage] | ||
public class NullAuditReporter : IAuditReporter | ||
{ | ||
public void Audit(ICallContext? context, string againstId, string auditCode, string messageTemplate, | ||
params object[] templateArgs) | ||
public void Audit(ICallContext? context, string againstId, string auditCode, | ||
[StructuredMessageTemplate] string messageTemplate, params object[] templateArgs) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using Common; | ||
using Common.Recording; | ||
using JetBrains.Annotations; | ||
|
||
namespace Infrastructure.Common.Recording; | ||
|
||
/// <summary> | ||
/// An <see cref="ICrashReporter" /> that does nothing | ||
/// </summary> | ||
[ExcludeFromCodeCoverage] | ||
public class NullCrashReporter : ICrashReporter | ||
{ | ||
public void Crash(ICallContext? context, CrashLevel level, Exception exception, string messageTemplate, | ||
params object[] templateArgs) | ||
public void Crash(ICallContext? context, CrashLevel level, Exception exception, | ||
[StructuredMessageTemplate] string messageTemplate, params object[] templateArgs) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters