Closed sherman89 closed 1 year ago
Hi @sherman89 , and thanks for using FusionCache!
For a lot of components I created a WithoutXyz()
method to specify you want to go "withOUT" it... but not for the logger it seems 🤷. My Bad, will add it in the next release.
Meanwhile you can simply use WithLogger(...)
and pass an instance of NullLogger<T>
.
Hope this helps, let me know.
Thanks @jodydonetti I did it this way now:
services.AddFusionCache()
.WithRegisteredMemoryCache()
.WithLogger(NullLogger<FusionCache>.Instance);
Seems to work fine 🙂
I guess I can close this issue now
Great, happy it worked!
Anyway I'm still adding a WithoutLogger()
in the next release, so to have a better dev exp with in a more explicit and less clunky way.
Will update you as soon as it will be available.
Hi @sherman89 , I'm tracking the development here.
Hello @sherman89 , v0.21.0-preview1 is out, which includes the new WithoutLogger()
method.
@jodydonetti Thank you! Will start using it as soon as possible :)
Hi, v0.21.0-preview2
is out: one more week of baking and the official v0.21.0
will be released 🎉
Hi all, I just release v0.21.0 which includes this 🎉
I'm currently using FusionCache as a simple memory cache, and I don't need any logging and would rather get that performance boost instead. Factory exceptions are already handled on application level so it's also unnecessary as far as I see?
What is the correct way to disable logging? Would it be this?
Thanks!