Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
VahidN committed Mar 31, 2024
1 parent f369aab commit 140bc3d
Showing 1 changed file with 31 additions and 24 deletions.
55 changes: 31 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,30 +593,37 @@ Or ... you can use the second optional parameter of the `DisableLogging` method
```c#
.DisableLogging(disable: !environment.IsDevelopment(), cacheableEvent: args =>
{
switch (args.EventId)
{
case CacheableLogEventId.CacheHit:
break;
case CacheableLogEventId.QueryResultCached:
break;
case CacheableLogEventId.QueryResultInvalidated:
break;
case CacheableLogEventId.CachingSkipped:
break;
case CacheableLogEventId.InvalidationSkipped:
break;
case CacheableLogEventId.CachingSystemStarted:
break;
case CacheableLogEventId.CachingError:
break;
case CacheableLogEventId.QueryResultSuppressed:
break;
case CacheableLogEventId.CacheDependenciesCalculated:
break;
case CacheableLogEventId.CachePolicyCalculated:
break;
}
Console.WriteLine($"{args.EventId} -> {args.Message}");
switch (args.EventId)
{
case CacheableLogEventId.CacheHit:
break;
case CacheableLogEventId.QueryResultCached:
break;
case CacheableLogEventId.QueryResultInvalidated:
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine($"{Environment.NewLine}{args.EventId} -> {args.Message}");

break;
case CacheableLogEventId.CachingSkipped:
break;
case CacheableLogEventId.InvalidationSkipped:
break;
case CacheableLogEventId.CachingSystemStarted:
break;
case CacheableLogEventId.CachingError:
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine($"{Environment.NewLine}{args.EventId} -> {args.Message}");

break;
case CacheableLogEventId.QueryResultSuppressed:
break;
case CacheableLogEventId.CacheDependenciesCalculated:
break;
case CacheableLogEventId.CachePolicyCalculated:
break;
}

Console.ResetColor();
})
```

Expand Down

0 comments on commit 140bc3d

Please sign in to comment.