https://github.com/verifytests/verify.zerolog
Extends Verify to allow verification of ZeroLog bits.
https://github.com/verifytests/verify.zerolog
Last synced: about 1 year ago
JSON representation
Extends Verify to allow verification of ZeroLog bits.
- Host: GitHub
- URL: https://github.com/verifytests/verify.zerolog
- Owner: VerifyTests
- License: mit
- Created: 2023-01-30T09:11:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T00:44:59.000Z (about 1 year ago)
- Last Synced: 2025-04-12T19:51:30.762Z (about 1 year ago)
- Language: C#
- Homepage:
- Size: 343 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license.txt
- Code of conduct: code_of_conduct.md
Awesome Lists containing this project
README
#
Verify.ZeroLog
[](https://github.com/orgs/VerifyTests/discussions)
[](https://ci.appveyor.com/project/SimonCropp/verify-zerolog)
[](https://www.nuget.org/packages/Verify.ZeroLog/)
Extends [Verify](https://github.com/VerifyTests/Verify) to allow verification of [ZeroLog](https://github.com/Abc-Arbitrage/ZeroLog) bits.
**See [Milestones](../../milestones?state=closed) for release notes.**
## NuGet package
https://nuget.org/packages/Verify.ZeroLog/
## Usage
```cs
[ModuleInitializer]
public static void Initialize() =>
VerifyZeroLog.Initialize();
```
snippet source | anchor
```cs
[Fact]
public Task Usage()
{
Recording.Start();
var result = Method();
return Verify(result);
}
static string Method()
{
var logger = LogManager.GetLogger();
logger.Error("The error");
logger.Warn("The warning");
return "Result";
}
```
snippet source | anchor
Results in:
```txt
{
target: Result,
log: [
{
Error: The error,
Logger: Tests
},
{
Warn: The warning,
Logger: Tests
}
]
}
```
snippet source | anchor